blob: 762d37facf0b1db15643da6b82c63bd78a8ca470 [file] [log] [blame]
Andy Bavier7e4a5462016-03-01 16:35:50 -05001#!/bin/sh
2
3apt-get update
4apt-get install bridge-utils
5brctl addbr databr
Andy Bavier418b9822016-03-02 14:38:38 -05006ifconfig databr 10.168.0.1/24 up
Andy Bavier9114d892016-03-02 14:35:28 -05007ip link add address 02:42:0a:a8:00:01 type veth
Andy Bavier7e4a5462016-03-01 16:35:50 -05008ifconfig veth0 up
9ifconfig veth1 up
10brctl addif databr veth0
Andy Bavier418b9822016-03-02 14:38:38 -050011iptables -t nat -A POSTROUTING -s 10.168.0.0/24 \! -d 10.168.0.0/24 -j MASQUERADE
Andy Baviere3a00512016-03-28 14:40:30 -040012sysctl -w net.ipv4.ip_forward=1