SHARE
TWEET

Untitled

a guest Jun 24th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ip link add veth0 type veth peer name veth0 netns sip
  2. ip link set veth0 up
  3. ip netns exec sip ip link set veth0 up
  4. ip addr add 172.25.136.1/24 dev veth0
  5. ip netns exec sip ip addr add 172.25.136.2/24 dev veth0
  6. ip route add 192.168.136.0/24 via 172.25.36.1
  7. ip netns exec sip ip route add 192.168.100.0/24 via 172.25.36.2
  8. iptables -A FORWARD -s 192.168.136.0/24 -d 192.168.100.0/24 -j ACCEPT
  9. ip netns exec sip iptables -A FORWARD -s 192.168.100.0/24 -d 192.168.136.0/24 -j ACCEPT
  10. ip netns exec sip echo 1 > /proc/sys/net/ipv4/ip_forward
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top