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 |
Andy Bavier | 418b982 | 2016-03-02 14:38:38 -0500 | [diff] [blame] | 6 | ifconfig databr 10.168.0.1/24 up |
Andy Bavier | 9114d89 | 2016-03-02 14:35:28 -0500 | [diff] [blame] | 7 | ip link add address 02:42:0a: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 |
Andy Bavier | 418b982 | 2016-03-02 14:38:38 -0500 | [diff] [blame] | 11 | iptables -t nat -A POSTROUTING -s 10.168.0.0/24 \! -d 10.168.0.0/24 -j MASQUERADE |
Andy Bavier | e3a0051 | 2016-03-28 14:40:30 -0400 | [diff] [blame] | 12 | sysctl -w net.ipv4.ip_forward=1 |