Okay, so I'm trying to setup a OpenVPN server and I've done it once before so I'm kind of a newbie. However I've gotten so far that I can on my client machine that I can connect but I can't browse internet/ping/do anything internet related just access my server.

Server Config: http://pastebin.com/Eju4Pifj

Client pc error log: http://pastebin.com/pPkxKGgZ (edited it out for my own safety)

Client config:

dev tun
tun-mtu 1500
proto tcp
remote My.local&.Wan.IP 1194
tls-remote server
ca ca.crt
cert BlaBlabLa.crt
key BlaBlabLa.key
auth SHA1
verb 0
route My.local&.Wan.IP net_gateway
verb 5

My servers local & remote ip in the config/log files = My.local&.Wan.IP

And ***.***.***.*** = (I think) my routers ip


You have to enable ip forwarding. To enable ip forwarding set net.ipv4.ip_forward as 1

echo 1 > /proc/sys/net/ipv4/ip_forward

To make this config permanent add this line to /etc/sysctl.conf

net.ipv4.ip_forward = 1

And lastly add MASQUERADE rule to iptables.

iptables -I POSTROUTING -t nat -s -j MASQUERADE

Then your clients can connect internet using your vpn tunnel.

  • Nope, that didn't help – Eric Aug 6 '12 at 16:44
  • For windows vista and windows 7, you have to add these two lines to your client config and you have to run openvpn client with admin permissions. route-method exe route-delay 2 – dirigeant Aug 9 '12 at 20:31

Got it working using this http://www.putdispenserhere.com/openvpn-debianubuntu-setup-script-for-openvz/

  • 2
    Consider at least summarizing the fix in your answer. If that link goes offline, this question won't be very helpful to someone else with the same problem. Also, you are encouraged to mark your own answer as selected! – Aaron Copley Aug 6 '12 at 18:52

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.