VPN bridging (two interfaces) question with OpenVPN
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
VPN bridging (two interfaces) question with OpenVPN
Hi all
I have a problem that I cannot get my mind around:
I basically want to create a VPN into my local network at home from outside.
I got server Atlas in my local net that also gives out IPs over DHCP.
If I set up OpenVPN in bridging mode, I should be able to take a client out into the internet and get it connected through the VPN as though I would be in the internal net, right? I could even get an internal address ouver DHCP and the DHCP server would not even know that I am outside.
Now there thing I don't understand:
Where will the bridge be on the network? where are two nets merged?
Server Atlas has two interfaces: eth0, which is internal and eth1 that is connected to the internet. Eth0 has a DHCP server running that serves out addresses to my local net. Eth1 is getting dynamic inet addresses itself from my ISP.
Then I got an interface on the client (laptop) that is outside (naturally). OpenVPN then creates a new device (tun or tap, don't remember which one right now) and that is then bridged with the physical one.
Something that boggles my mind, and there I guess I lack the bridging knowhow, is how can two interfaces be bridged with eachother without the former interface loosing its IP address (which it does, I tried it) and still be able to pass the data through the network.
Example: I open up the VPN on the client, got two interfaces, that VPN and the physical. The VPN communicates through the physical. If I bridge them both, I pull the carpet from underneath me and the VPN collapses, since it cannot access the physical NIC anymore.
If I don't do that, the laptop (client, outside) will become a multi homed host. Is that how VPNs usually are setup? With proper routing, I should be able to still decide where the standard traffic should pass through (through the vpn naturally).
A bridge uses MAC addresses rather than the IP addresses to join network segments. IMHO it would be better to use subnetting instead and treat the respective VPN devices as gateway devices.
Unfortunately, that does not do the trick for me. When you depend on broadcasts to go through both ways routing fails.
I would be grateful for ANY account of somebody that is using bridging with VPN. So far, nobody seems to be using it that way, which I can somehow not believe, considering the advantages it offers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.