Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:

Client pc error log: (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

share|improve this question

2 Answers 2

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.

share|improve this answer
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

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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