blob: 50090a9d050751c737978934008873a5e8735f91 [file] [log] [blame]
Andy Bavierc518f252016-04-08 16:37:54 -04001#!/bin/sh
2
3apt-get update
4apt-get install bridge-utils
5brctl addbr databr
6ifconfig databr 10.168.0.1/24 up
7ip link add address 02:42:0a:a8:00:01 type veth
8ifconfig veth0 up
9ifconfig veth1 up
10brctl addif databr veth0
11ip addr add 10.168.1.1/24 dev databr
12iptables -t nat -A POSTROUTING -s 10.168.0.0/16 \! -d 10.168.0.0/16 -j MASQUERADE
13sysctl -w net.ipv4.ip_forward=1
14sysctl -w net.ipv4.conf.all.send_redirects=0
15sysctl -w net.ipv4.conf.default.send_redirects=0
16sysctl -w net.ipv4.conf.eth0.send_redirects=0
17sysctl -w net.ipv4.conf.databr.send_redirects=0