Networking Forums

Networking Forums > Computer Networking > Linux Networking > vtun, bridging and dhcp

Reply
Thread Tools Display Modes

vtun, bridging and dhcp

 
 
fabrice.gautier@gmail.com
Guest
Posts: n/a

 
      04-30-2005, 12:08 AM
Hi,

I'm trying to setup some kind of linux VPN.
The host network IP is (lets says) 192.168.1.x My goal is too have a
remote client computer connected to a virtual interface with an IP
adress in the 192.168.1.x range. Both client and "VPN server" are
running linux.

Right know it works as long as I use a static IP for the remote client.
Here are the details:

Initially I have "VPN server" (Server) in the host network with
eth0=192.168.1.1.


1/ On Server I configure a bridge br0 with only one port (eth0):
br0=192.168.1.1, eth0=0.0.0.0
2/ I setup a vtun tunnel, ether type, between Server and Client so I
have two virtual interfaces tap0 on Server and tap1 on Client
(unconfigured yet)
3/ I add tap0 port to br0 and bring it up
tap0=0.0.0.0
4/ I manually configure tap1 on Client :
ifconfig tap1 192.168.1.101

This works fine, my Client is now seen as being on the host network,
and I can ping anyways...

Now if I replace 4/ by ifup tap1, with tap1 configure for dhcp, its not
working so well. Apparently I get a DHCP lease from a server on the
host network, but then it stalls and eventually the tunnel will
disconnect and I will even loose my ssh connection to the Client.

Any ideas why DHCP is different ?

Thanks

-- F.G.

 
Reply With Quote
 
 
 
 
Michael Perry
Guest
Posts: n/a

 
      05-01-2005, 02:22 AM
On Fri, 29 Apr 2005 17:08:59 -0700, fabrice.gautier wrote:

> Hi,
>
> I'm trying to setup some kind of linux VPN.
> The host network IP is (lets says) 192.168.1.x My goal is too have a
> remote client computer connected to a virtual interface with an IP
> adress in the 192.168.1.x range. Both client and "VPN server" are
> running linux.
>
> Right know it works as long as I use a static IP for the remote client.
> Here are the details:
>
> Initially I have "VPN server" (Server) in the host network with
> eth0=192.168.1.1.
>
>
> 1/ On Server I configure a bridge br0 with only one port (eth0):
> br0=192.168.1.1, eth0=0.0.0.0
> 2/ I setup a vtun tunnel, ether type, between Server and Client so I
> have two virtual interfaces tap0 on Server and tap1 on Client
> (unconfigured yet)
> 3/ I add tap0 port to br0 and bring it up
> tap0=0.0.0.0
> 4/ I manually configure tap1 on Client :
> ifconfig tap1 192.168.1.101
>
> This works fine, my Client is now seen as being on the host network,
> and I can ping anyways...
>
> Now if I replace 4/ by ifup tap1, with tap1 configure for dhcp, its not
> working so well. Apparently I get a DHCP lease from a server on the
> host network, but then it stalls and eventually the tunnel will
> disconnect and I will even loose my ssh connection to the Client.
>
> Any ideas why DHCP is different ?
>
> Thanks
>
> -- F.G.


I don't know why its different in the tunnel you are using; but I've setup
vpn a few times using Openvpn which does a whole bunch of stuff including
respecting DHCP settings. Have you messed with OpenVPN at all? Truly
powerful and versatile. It'll run on Linux, BSDs, Windows. It has a
variety of authentication mechanisms includng a static key, full-on SSL,
etc. It can routed or bridged networking. There are debian packages in
testing and unstable and I've built the source package in rpm format for
Fedora Core 3. I'm running it fulltime and using it to connect a linux
client and a XP client. Works great! I've also setup small businesses
with it and the Windows client is very nice.

All open sourced, maintained and developed actively. Good examples on the
website. That would be http://www.openvpn.net BTW.


--
Michael Perry | do or do not. There is no try. -Master Yoda
(E-Mail Removed) | http://www.lnxpowered.org


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting 2 sites together via VTUN, routing issue google@johnharlow.com Linux Networking 1 01-18-2005 04:12 PM
need help with bridging Madhur Ahuja Linux Networking 2 10-08-2004 10:00 AM
MN-700 Bridging Vladimir Zaychik Broadband Hardware 1 08-18-2004 12:10 AM
Bridging Greg Milstead Broadband Hardware 2 02-10-2004 09:20 PM
samba network masks and vtun HelloMan Linux Networking 1 12-23-2003 11:58 AM



1 2 3 4 5 6 7 8 9 10 11