Commit e391edfd authored by zhifan huang's avatar zhifan huang

change iptables name

parent e99fcb5b
......@@ -268,10 +268,11 @@ def net_demo():
for node in [node1, node2]:
node.add_route("10.0.0.0/8", 'via', "10.1.1.1")
gateway1.run(['iptables', '-t', 'nat', '-A', 'POSTROUTING', '-o', veth_g1_1.name, '-j', 'MASQUERADE'])
gateway1.run(['iptables', '-t', 'nat', '-N', 'MINIUPNPD'])
gateway1.run(['iptables', '-t', 'nat', '-A', 'PREROUTING', '-i', veth_g1_1.name, '-j', 'MINIUPNPD'])
gateway1.run(['iptables', '-N', 'MINIUPNPD'])
# nft works in testnode...
gateway1.run(['iptables-nft', '-t', 'nat', '-A', 'POSTROUTING', '-o', veth_g1_1.name, '-j', 'MASQUERADE'])
gateway1.run(['iptables-nft', '-t', 'nat', '-N', 'MINIUPNPD'])
gateway1.run(['iptables-nft', '-t', 'nat', '-A', 'PREROUTING', '-i', veth_g1_1.name, '-j', 'MINIUPNPD'])
gateway1.run(['iptables-nft', '-N', 'MINIUPNPD'])
veth_it3.add_ip4("10.2.0.1", 24)
veth_g2_1.add_ip4("10.2.0.2", 24)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment