Site-to-Site Layer 2 Bridging Using OpenVPN Access Server And A Linux Gateway Client | OpenVPN (2024)

Introduction

This functionality is deprecated and we no longer offer support. Please refer to our detailed guide on how to set up Site-to-Site networks using routing: Site-to-Site VPN Routing Explained in Detail

OpenVPN Access Server can be configured in a site-to-site bridging setup that allows you to transparently bridge two sites together using a OpenVPN gateway client.

In order to do so, some requirements must be met. These requirements are detailed below.

Bridging overview and requirements

Site-to-Site Layer 2 Bridging Using OpenVPN Access Server And A Linux Gateway Client | OpenVPN (1)

The diagram above depicts a typical site-to-site layer 2 bridging setup. In order to complete this setup, all of the following requirements must be met:

  1. You have two sites, each one connected to the Internet. One site will be hosting the Access Server and one site will be hosting the OpenVPN client.
  2. The site hosting the Access Server must be accessible from the Internet, or have its required ports forwarded to it from the Internet.
  3. Access Server must not be installed on a virtual platform that does not support bridging capabilities (e.g. OpenVZ). If Access Server is installed on a virtual platform, the network being bridged must have Promiscuous Mode turned on at the vSwitch.
  4. The multi-daemon mode must not be in use. Under Network Settings, set it to run only 1 TCP daemon and only 1 UDP daemon.
  5. The OpenVPN client must have at least two Ethernet interfaces, one connected to the Internet, one connected to the private LAN segment (as depicted in the yellow segments on the left of the diagram).
  6. The OpenVPN client must have IP forwarding enabled, as well as bridge-utils and openvpn installed, and running a Linux operating system (per these instructions).
  7. You must have administrative access to the OpenVPN Client machine, including uploading files and SSH/SFTP access.
  8. The private LAN segment (in left, yellow), should not be connected to another network. In other words, it should be isolated to the computers you want to bridge to the other site.

Bridging Configuration

In order to start the bridging process, you must first have Access Server generate an autologin profile. To do so, visit the User Permissions area, create an appropriate username for the bridging OpenVPN client, and then check the Allow Auto-login checkbox. Click the Update Running Server button to make sure the changes take effect.

Site-to-Site Layer 2 Bridging Using OpenVPN Access Server And A Linux Gateway Client | OpenVPN (2)


Now, login to the Client Web Server (CWS) and select the Login dropdown, when prompted.

Site-to-Site Layer 2 Bridging Using OpenVPN Access Server And A Linux Gateway Client | OpenVPN (3)


Download the autologin profile that is offered to you in the CWS.

Site-to-Site Layer 2 Bridging Using OpenVPN Access Server And A Linux Gateway Client | OpenVPN (4)


Download the following bridging scripts onto your computer:
bridge-up.sh bridge-down.sh
Using a SFTP client such as Filezilla or Cyberduck, upload the ovpn profile, and the two bridging scripts you have downloaded, onto the Linux OpenVPN client machine. Upload these to the /etc/openvpn/ folder.

NOTE: If you have a ESXi host capable of running 64-bit operating systems, you can save yourself some time by deploying a preconfigured Debian OpenVPN Client here. You will not need to download the bridging scripts if you are using the preconfigured ESXi OpenVPN client.

Login to your Linux OpenVPN Client via SSH. Once logged on:

1) Rename the OpenVPN profile into a .conf extension by issuing the following commands:
cd /etc/openvpn mv client.ovpn client.conf

2) Make sure the bridge-utilities are installed on the system by invoking the brctl command. The command should display the usage help page when it is properly installed. If you get a command not found error, you will need to make sure you have the bridge utilities installed for your Linux distribution.

For Debian/Ubuntu distributions, this can be installed by using the apt-get install bridge-utils command.

3) Determine which interface is your private interface you want to bridge. Theoretically speaking, this should be the interface that is isolated to the clients and not already have an IP address assigned to it. If you are uncertain, use the ifconfig -a command and verify the interface name using its MAC address. Make sure you do not mistakenly note the interface you use to connect to the Internet, or else you WILL lose connectivity! Note this interface name down for the next step.

4) Using a text editor such as nano, edit the bridge-up.sh file (In the ESXi OpenVPN Client appliance, this file is located in /sbin/). Under the define physical ethernet interface section, change eth="eth1" to the interface name to the one you have determined in the previous step. For example, if you determined that the private interface is called eth2, change eth1 to eth2. Also, change the IP address and subnet mask to a static IP you want to assign to the bridge (this IP address and subnet should be one that is located on the remote site you are trying to bridge). Save the file and exit the text editor.

5) Using a text editor such as nano, edit the autologin profile you have downloaded from the CWS. On the top of the file, add these following lines to the profile:

up "/bin/bash /etc/openvpn/bridge-up.sh" down "/bin/bash /etc/openvpn/bridge-down.sh" script-security 2 route-nopull

NOTE: For the ESXi OpenVPN Client, use the /sbin/bridge-up.sh and /sbin/bridge-down.sh paths instead of /etc/openvpn/bridge-up.sh and /etc/openvpn/bridge-down.sh paths.

Save the file, and then exit the text editor.

6) Start the OpenVPN profile by restarting the OpenVPN Service, using the /etc/init.d/openvpn restart command.

7) Verify that the connection is active by issuing a ifconfig br0 command. If the bridging is successful, the br0 interface should be configured with the IP address you have set earlier in the bridge-up.sh configuration file. At this point, your bridged site clients should be able to obtain an IP address via DHCP or by manual configuration.

Site-to-Site Layer 2 Bridging Using OpenVPN Access Server And A Linux Gateway Client | OpenVPN (2024)
Top Articles
Certificate Manager overview  |  Google Cloud
Octa Review - Investing.com NG
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Pearson Correlation Coefficient
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Kimberely Baumbach CPA

Last Updated:

Views: 5516

Rating: 4 / 5 (41 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Kimberely Baumbach CPA

Birthday: 1996-01-14

Address: 8381 Boyce Course, Imeldachester, ND 74681

Phone: +3571286597580

Job: Product Banking Analyst

Hobby: Cosplaying, Inline skating, Amateur radio, Baton twirling, Mountaineering, Flying, Archery

Introduction: My name is Kimberely Baumbach CPA, I am a gorgeous, bright, charming, encouraging, zealous, lively, good person who loves writing and wants to share my knowledge and understanding with you.