executable_eiskaltdcpp-namespace 479 B

1234567891011121314
  1. #!/usr/bin/env bash
  2. set -o nounset -o errexit -o pipefail
  3. sudo ip link add macvlan0 link tapvpn1 type macvlan mode bridge
  4. sudo ip link set macvlan0 netns ns0
  5. sudo ip netns exec ns0 ip link set macvlan0 up
  6. sudo ip netns exec ns0 ip addr add 192.168.25.12/24 dev macvlan0
  7. sudo ip netns exec ns0 ping 192.168.25.3
  8. # vm1.wugi.info
  9. echo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  10. echo iptables -A FORWARD -i tapvpn1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT