Purevpn and wireguard how to work with OpenWrt

config zone
	option name 'wireguard'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	list network 'wg0'

config forwarding
	option src 'lan'
	option dest 'wireguard'
config interface 'wg0'
	option proto 'wireguard'
	option private_key '11'
	
config wireguard_wg0
	option description 'ALGERIAVPN'
	option public_key 'other'
	option private_key '11'
	list allowed_ips '0.0.0.0/0'
	option route_allowed_ips '1'
	option endpoint_host 'sx1210304-wg.pointtoserver.com'
	option endpoint_port '51820'
	option persistent_keepalive '21'

hi everybody the 11 has a same key private 11

i use purevpn but doesn't connect unfrontunatly

@psherman do you have an idea ? thanks

only tx traffic

you're missing an interface address... this is required.

1 Like

sorry but is always not resolve

list addresses '172.111.243.39'

i will do a custom dns you think ?

I can make a lot of vpn work with wireguard but for purevpn it doesn't work very well

It needs to be an IP address like what you show. It cannot be a domain name, so not sure what you mean by "always not resolve"

The interface address will have been given to you by the VPN provider. You must use the address they provide.

if you want to do custom DNS, that is fine, but that is handled in a different configuration option (not the WG config).

You may need to ask purevpn for support. Sometimes the best option is to get it working on a mobile phone or a computer... once you know that works, you can move that config to your OpenWrt system.

1 Like
Address=172.111.243.39
DNS=172.111.243.131,172.111.243.133
[Peer]

purevpn service i has also contacted he talk me do'nt say the problem

ok... make sure this is in the interface address field.

DNS is set in the /etc/config/dhcp file. If you don't need to use their servers, you may find it is easier to use a public DNS like 8.8.8.8 or others.

1 Like

psherman

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'
	list server '172.111.243.131'
	list server '172.111.243.133'

i has changed dans in wan toi but not work for thé moments

This will work, but only when the VPN is connected. If the VPN is not running, those servers will not be available, and your DNS resolution will fail. This will create a chicken-or-egg situation with the ability to actually start the tunnel since you can't resolve the domain.

1 Like

i came try 3 server different ... :confused:

i abandon for the moment i'm tired for pure vpn surfshark work durectly and connect instaltly

It is possible that there is something special about the purevpn details that prevent it from working as expected with Wireguard. But this is why a computer or phone can be a good test -- you can prove that it is working first, then use those parameters to setup the WG connection on OpenWrt.

But given that you have another path...

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.