Page 1 of 1

tun or tap?

Posted: Thu Dec 30, 2010 2:43 pm
by hansaplast
Hi there,

When I create a OpenVPN tunnel (dev tun) a ptp NIC device is used to communicate VPN traffic.
If I sniff the server-side tun device and ping from client to server, traffic seems to come from the IP address assigned to the clients tun device.

In order to connect two LANs together this means that I have to NAT traffic. Using "dev tun" is there a way to forward real LAN IP's (those on eth0) to the VPN LAN? Or do I need to bridge tap and eth0 together in order to get "real" IP's to the other side?

Regards,
Hansa

Re: tun or tap?

Posted: Thu Dec 30, 2010 2:59 pm
by gladiatr72
Hansa,

Hello. You're almost right. One option is to have NAT functionality setup for your client subnet. The other method is to add a route on the server network for the client subnet. In a situation where the openvpn server is not the default gateway , you will need to add a route to whatever system is the default gateway to direct traffic for the client network to the openvpn server.

-Stephen