What's new

Redirect internet traffic not working with openvpn

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

tossom

Occasional Visitor
Hello experts,

I got a little hustle to redirect the whole internet traffic through the openvpn tunnel. The openvpn server is up and running on merlins firmware (build 374.33). Here my server config:

Service state: on
start with wan: yes
interface type: tun
protocol: tcp
port: 443
firewall: automatic
authorisation mode: tls
extra hmac authorisation: disabled
vpn subnet/ mask: 10.8.0.0 255.255.255.0
Poll interval: 0
push LAN to clients: yes
direct clients to redirect internet traffic: no
respond to dns: no
encryption cypher: aes-128-cbc
compression: adaptive
tls renegotiation time: -1
manage client specific options: no

And the client config:

client
server-poll-timeout 4
connect-retry-max 5
resolv-retry 60
nobind
remote remoteadress.no-ip.com 443 tcp
dev tun
ns-cert-type server
remote-cert-tls server
cipher AES-128-CBC
comp-lzo
verb 3
ca ca.crt
cert client1.crt
key client1.key

I can connect to the local LAN from the outside, but if I switch the option "Direct clients to redirect Internet traffic" to yes on the web gui, the client installed on my laptop will connect to the server, but I can't load any web pages. The local LAN remains accessible. I saw in the configuration file of the server, that this option adds

push "redirect-gateway def1"

to the server settings. I am also using the openvpn client under IOS. If I add there in the client config file "redirect-gateway def1", than all web traffic from the IOS device is going through the router without any problems (without changing the server settings to redirect the internet traffic). If I use the same client configuration which works under IOS on my laptop, it's also not possible to load web pages. Once again, only the LAN side can be reached. The laptop uses the openvpn client from their website and has win7 pro as OS. Does anyone have maybe an idea what’s going wrong or can confirm similar problems? Would be nice to get working an my Laptop as well.
 
If you switch "Respond to DNS" to yes and Advertise DNS to clients to yes, than it works. You can leave the option "Direct clients to redirect Internet traffic" switched off. If you put in the client config the comand "redirect-gateway def1", the total internet traffic will be routed through the tunnel. Like this, you can just configure 2 different profiles with openvpn and switch between them.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top