This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
user_guide:openvpn_bridges_prep_os [2016/09/26 05:12] – created admin | user_guide:openvpn_bridges_prep_os [2020/08/12 13:52] (current) – [Configure the Interfaces] admin | ||
---|---|---|---|
Line 14: | Line 14: | ||
lsmod | grep 8021q | lsmod | grep 8021q | ||
</ | </ | ||
+ | |||
+ | ------------ | ||
+ | |||
===== Install Bridge Utilities ===== | ===== Install Bridge Utilities ===== | ||
Line 22: | Line 25: | ||
sudo apt-get install bridge-utils | sudo apt-get install bridge-utils | ||
</ | </ | ||
+ | |||
+ | ----------- | ||
+ | |||
===== Configure the Interfaces ===== | ===== Configure the Interfaces ===== | ||
- | * Edit the **/ | + | * If your server has **only one** interface card, edit the **/ |
+ | <WRAP center round tip 90%> | ||
+ | We assume here the eth0 port now has the public IP address and give the dummy interface the name of eth1. Please consider this in the configurations after this page and change accordingly. | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | # This script is executed at the end of each multiuser runlevel. | ||
+ | # Make sure that the script will "exit 0" on success or any other | ||
+ | # value on error. | ||
+ | # | ||
+ | # In order to enable or disable this script just change the execution | ||
+ | # bits. | ||
+ | # | ||
+ | # By default this script does nothing. | ||
+ | |||
+ | #Set up the dummy interface | ||
+ | / | ||
+ | /sbin/ip link add dummy0 type dummy | ||
+ | /sbin/ip link set name eth1 dev dummy0 | ||
+ | / | ||
+ | /sbin/ip link set eth1 up promisc on | ||
+ | |||
+ | #Now add the VLAN | ||
+ | / | ||
+ | /sbin/ip link set eth1.101 up promisc on | ||
+ | /sbin/brctl addbr br0.101 | ||
+ | /sbin/brctl addif br0.101 eth1.101 | ||
+ | /sbin/ip addr add 10.101.0.1/ | ||
+ | /sbin/ip link set dev br0.101 up | ||
+ | |||
+ | / | ||
+ | /sbin/ip link set eth1.102 up promisc on | ||
+ | /sbin/brctl addbr br0.102 | ||
+ | /sbin/brctl addif br0.102 eth1.102 | ||
+ | /sbin/ip addr add 10.102.0.1/ | ||
+ | /sbin/ip link set dev br0.102 up | ||
+ | |||
+ | |||
+ | / | ||
+ | /sbin/ip link set eth1.103 up promisc on | ||
+ | /sbin/brctl addbr br0.103 | ||
+ | /sbin/brctl addif br0.103 eth1.103 | ||
+ | /sbin/ip addr add 10.103.0.1/ | ||
+ | /sbin/ip link set dev br0.103 up | ||
+ | |||
+ | exit 0 | ||
+ | |||
+ | </ | ||
+ | |||
+ | * If your server has two intercace cards, edit the **/ | ||
<code bash> | <code bash> | ||
#Remember also to configure eth1 to contain the public IP Address... | #Remember also to configure eth1 to contain the public IP Address... | ||
Line 58: | Line 113: | ||
bridge_ports eth0.103 | bridge_ports eth0.103 | ||
</ | </ | ||
+ | |||
+ | |||
+ | ----------- | ||
+ | |||
===== Confirm it is correct ===== | ===== Confirm it is correct ===== | ||