Using tap mode without ethernet bridging on server side.

All comments and questions related to the functionality of the OpenVPN web pages and forum should go here.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
tushar.sharma
OpenVPN Power User
Posts: 58
Joined: Fri Oct 07, 2011 12:23 pm
Location: Pune
Contact:

Using tap mode without ethernet bridging on server side.

Post by tushar.sharma » Tue Jan 31, 2012 8:56 am

Hello all,

I am facing some problem with ethernet bridging, as br0 is created so local lan nic losses its original identity and iptables rules written with interface -i eth1(lan) option no more works !!

So I was thinking that is it possible to use tap mode assign ip to remote vpn client from local subnet of server using server-bridge ip netmaskoption, without bridging lan nic & tap0.

So that it will solve my problems.,Currently i want to assign ip using dhcp server.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Using tap mode without ethernet bridging on server side.

Post by janjust » Wed Feb 01, 2012 1:20 pm

yes this is possible (I think :mrgreen: ) but you will need to run something like

Code: Select all

dhcrelay -i tap0 -i eth1
to forward all DHCP traffic from the VPN to the DHCP server on the eth1 LAN.

tushar.sharma
OpenVPN Power User
Posts: 58
Joined: Fri Oct 07, 2011 12:23 pm
Location: Pune
Contact:

Re: Using tap mode without ethernet bridging on server side.

Post by tushar.sharma » Thu Feb 02, 2012 12:07 pm

Thanks JJK for reply,

So will it work without even bridging local lan nic & tap0 and serving same behaviour as in case of ethernet bridging in tap mode ?

Thanking You
Tushar Sharma

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Using tap mode without ethernet bridging on server side.

Post by janjust » Thu Feb 02, 2012 10:14 pm

it won't be the same as bridging - but you CAN use an external DHCP server in tap mode without bridging. Bridging forwards all packets between the interfaces that are bridged (usually ethX and tapX) : this functionality will be lost without the bridge.

tushar.sharma
OpenVPN Power User
Posts: 58
Joined: Fri Oct 07, 2011 12:23 pm
Location: Pune
Contact:

Re: Using tap mode without ethernet bridging on server side.

Post by tushar.sharma » Fri Feb 03, 2012 6:20 am

Then how would be packets routed from local lan subnet to tap interface?

considering what you have said, i have following setup


(pc 192.168.2.100)---(server 192.168.103.58)--(network)--(192.168.103.61 client)----(pc192.168.3.100)

now server will assign ip using dhrelay option to client from its local subnet i.e 192.168.2.0/24 subnet,
server will also assign one ip from same subnet to its tap interface but how packets would be routed from local lan nic and subnet and tap interface on server side. ?


Thanking You
Tushar

Post Reply