I have OpenVPN client setup on DD-WRT openvpn small.

client connects and can use traceroute to verify everything is tunneling out the openvpn connection.

ip_forward is 1.

iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

The lan client can connect to the internet through the DD-WRT router when it's not connected to OpenVPN.

Once connected, I cannot access the internet through the Lan client, I'm wondering what i'm missing, been trying to get this working for days.

migrated from serverfault.com Dec 20 '10 at 15:48

This question came from our site for system and network administrators.


What traffic are you sending down the OpenVPN tunnel? If it's everything, I'm assuming traffic from the LAN clients is also going down the tunnel instead of out to the Internet.

You've not said where the OpenVPN tunnel is going, but if you're trying to engineer a setup where specific traffic goes down your VPN tunnel and the rest goes straight out to the Internet, you'll want to set up a split-tunnel style VPN. If you're not in a position to configure the server side of the OpenVPN tunnel, you might have to get creative by manually adding routes after the VPN connection has come up, although bear in mind that whoever set up the VPN will probably have it up the way the have for security reasons.

  • 1
    Hi Andy, Thanks for your response, it's not a split tunnel traffic, I want to send all traffic down the OpenVPN tunnel. Basic idea is this 1x Router connect to WAN Port providing internet access. 1x Router configured as the OpenVPN device (DD-WRT) Normal lan/wifi traffic get's DHCP from router one connected to the WAN. other clients are configured to point to router 2. I can do a traceroute on a DD-WRT router and traffic is going out the VPN tunnel, but Lan clients pointed to the DD-WRT router dont get any access at all. – shayne Dec 20 '10 at 7:07
  • No problem. I'd start by adding a log line to the end of all your iptables chains, and see if anything's being dropped. – Andy Smith Dec 20 '10 at 11:41
  • This : dd-wrt.com/phpBB2/viewtopic.php?t=35689 : may also help you. (Everything you need is in first post now) I helped contribute to thread years ago.. Though, I haven't run openvpn on dd-wrt in a bit, it should still be of help. – bshea Aug 22 '16 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy