blob: 5b9c4c35db7c78087525ae2a771fa7aa57bdb1a8 [file] [log] [blame]
peustermf1652422016-06-21 08:48:17 +02001#! /bin/bash
2
3#This gives time to the Dockernet to configure the network namespace of the container
4sleep 3
5
6echo "Ubuntu started"
7echo "start ovs"
8service openvswitch-switch start
9
10NAME='fw'
11
12#echo "setup ovs bridge"
13ovs-vsctl add-br $NAME
14#ovs-vsctl set bridge $NAME datapath_type=netdev
15ovs-vsctl set bridge $NAME protocols=OpenFlow10,OpenFlow12,OpenFlow13
16#ovs-vsctl set-fail-mode $NAME secure
17#ovs-vsctl set bridge $NAME other_config:disable-in-band=true
18
19ovs-vsctl add-port $NAME ${NAME}-eth0
20
21#send out through same interface, on single port
22ovs-ofctl add-flow $NAME 'in_port=1,action=in_port'
23
24# iptables -I FORWARD -m physdev --physdev-in eth0 --physdev-out eth1 -d 8.8.8.8 -j DROP
25
26echo "Firewall started"