Andy Bavier | 7e4a546 | 2016-03-01 16:35:50 -0500 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
3 | apt-get update | ||||
4 | apt-get install bridge-utils | ||||
5 | brctl addbr databr | ||||
6 | ifconfig databr 192.168.0.254/24 up | ||||
Andy Bavier | e085e4e | 2016-03-01 16:46:30 -0500 | [diff] [blame] | 7 | ip link add address 02:42:c0:a8:00:01 type veth |
Andy Bavier | 7e4a546 | 2016-03-01 16:35:50 -0500 | [diff] [blame] | 8 | ifconfig veth0 up |
9 | ifconfig veth1 up | ||||
10 | brctl addif databr veth0 | ||||
11 | iptables -t nat -A POSTROUTING -s 192.168.0.0/24 \! -d 192.168.0.0/24 -j MASQUERADE |