#!/bin/bash br="br0" tap="tap0" eth="enp0s10f0" br_ip="10.3.5.1" br_netmask="255.255.0.0" br_broadcast="10.3.255.255" # Create the tap adapter openvpn --mktun --dev $tap # Create the bridge and add interfaces brctl addbr $br brctl addif $br $eth brctl addif $br $tap # Configure the bridge ifconfig $tap 0.0.0.0 promisc up ifconfig $eth 0.0.0.0 promisc up ifconfig $br $br_ip netmask $br_netmask broadcast $br_broadcast