You're likely asking for
Ethernet Bridging,
described as:
Ethernet bridging essentially involves combining an ethernet interface
with one or more virtual TAP interfaces and bridging them together
under the umbrella of a single bridge interface. Ethernet bridges
represent the software analog to a physical ethernet switch. The
ethernet bridge can be thought of as a kind of software switch which
can be used to connect multiple ethernet interfaces (either physical
or virtual) on a single machine while sharing a single IP subnet.
By bridging a physical ethernet NIC with an OpenVPN-driven TAP
interface at two separate locations, it is possible to logically merge
both ethernet networks, as if they were a single ethernet subnet.
The linked OpenVPN article describes the method to use.
As this might change in the future, here is just a very
short summary.
- Have the
bridge-utils package installed
- Edit the
OpenVPN server configuration file
to enable a bridging configuration
- Set up the Linux firewall to permit the new interfaces
- The OpenVPN bridge can now be started and stopped using this sequence:
- run
bridge-start
- run openvpn
- stop openvpn
- run
bridge-stop
For details, see the article.