Michael Still | 9e81421 | 2013-12-25 11:19:28 +1100 | [diff] [blame] | 1 | ip netns add nonet |
2 | ip link add veth0 type veth peer name veth1 | ||||
3 | ifconfig veth0 172.16.0.1/24 up | ||||
4 | ip link set veth1 netns nonet | ||||
5 | ip netns exec nonet ifconfig veth1 172.16.0.2/24 up | ||||
6 | /sbin/iptables -A INPUT -p tcp --dport 3306 -i eth0 -j DROP | ||||
7 | /sbin/iptables -A INPUT -p tcp --dport 3306 -i eth1 -j DROP |