Hi!!!
I have been trying to configure a VPN tunnel for the last days....
Here is the setup i have:
Remote network (Where the vpn server is):
Main subnet: 192.168.1.x, the DNS is @ 192.168.1.3, the gateway @ 192.168.1.155
VPN Subnet: 10.8.0.x
Local network (my home, from where i want to connect)
Main subnet: 192.168.1.x, the DNS is @ 192.168.1.1, the gateway @ 192.168.1.1
Here is the thing: I have chosen tunneling over bridging because it seems easier to set-up, and i successfully made it work.. now the problem:
If on the server side, i have this in my config file:
push "dhcp-option DNS 192.168.1.3"
push "dhcp-option WINS 192.168.1.3"
push "redirect-gateway def1"
I successfully browse the internet using the tunnel (whatismyip reports i have the ip of my company, so, its ok)
BUT, i cannot access the machines on the local network of my job (192.168.1.x)
However, if i do this:
push "route 192.168.1.0 255.255.255.0"
push "dhcp-option DNS 192.168.1.3"
push "dhcp-option WINS 192.168.1.3"
push "redirect-gateway def1"
I see the machines on the remote network!.... but i cannot access the internet via the remote vpn.......
I wish i could have both things........ is it possible?
I followed the instructions on this page to set the server up:
https://wiki.archlinux.org/index.php/OpenVPN
Configuring iptables to forward the traffic...
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
, as the wiki i referenced before points out....
So... any idea? or what i am asking for is impossible? 🙂