2

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:

    client
float
dev tun
tun-mtu 1500
mssfix
proto tcp
remote My.local&.Wan.IP 1194
tls-remote server
ca ca.crt
cert BlaBlabLa.crt
key BlaBlabLa.key
auth SHA1
nobind
comp-lzo
persist-key
persist-tun
verb 0
route My.local&.Wan.IP 255.255.255.255 net_gateway
route 0.0.0.0 0.0.0.0
verb 5

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

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

2 Answers 2

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 10.0.0.0/24 -j MASQUERADE

Then your clients can connect internet using your vpn tunnel.

2
  • Nope, that didn't help
    – Eric
    Aug 6, 2012 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, 2012 at 20:31
1

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

1
  • 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! Aug 6, 2012 at 18:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .