OpenVPN share internet connection with client

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking
Author Message
parad
DD-WRT Novice


Joined: 12 Aug 2010
Posts: 9

PostPosted: Tue May 08, 2012 21:45    Post subject: OpenVPN share internet connection with client Reply with quote
I've a wrt160n with DD-WRT (18946M NEWD-2 K2.6 Eko). Last week I've set up an OpenVPN server on it and a client on my notebook. I can connect to it without any trouble, but I don't know how to get internet access througth it.

Server config on wrt160n with DD-WRT:
Code:
push "route 192.168.1.0 255.255.255.0"
server 10.8.0.0 255.255.255.0

dev tun0
proto udp
keepalive 10 120

dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem

management localhost 5001


Client setup on my notebook:
Code:
client
dev tun

proto udp
remote xxxxxxxxx.dyndns.org 1194
resolv-retry infinite
nobind
persist-key
persist-tun

ca ca.crt
cert PabloNotebook.crt
key PabloNotebook.key

ns-cert-type server
verb 5


Firewall:
Code:
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 10.8.0.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT


What else I need to use the internet connection behind OpenVPN on my notebook?

I've been searching info about this for 2 days (googling, searching on DDWRT, doing some tests). There are a lot of questions like this but on different situations, and I've tried all the answers I'd found with no luck.

I've tried ping other IPs on the router network and got no answer.
Sponsor
parad
DD-WRT Novice


Joined: 12 Aug 2010
Posts: 9

PostPosted: Tue May 08, 2012 22:27    Post subject: Reply with quote
I've tried adding redirect-gateway and DNS to server config:

Code:
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.0.1"

or
Code:
push "dhcp-option DNS 8.8.8.8"


And this to the firewall:

Code:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE


But nothing of this works.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum