Commit 1554d8ef authored by Boris Kocherov's avatar Boris Kocherov

demo: add MINIUPNPD-POSTROUTING chain

parent ebee829d
...@@ -106,6 +106,8 @@ m6_if_1, m9_if_0 = nemu.P2PInterface.create_pair(machine6, machine9) ...@@ -106,6 +106,8 @@ m6_if_1, m9_if_0 = nemu.P2PInterface.create_pair(machine6, machine9)
r2_if_0, in_if_4 = nemu.P2PInterface.create_pair(registry2, internet) r2_if_0, in_if_4 = nemu.P2PInterface.create_pair(registry2, internet)
g1_if_0_name = g1_if_0.name g1_if_0_name = g1_if_0.name
gateway1.Popen((IPTABLES, '-t', 'nat', '-N', 'MINIUPNPD-POSTROUTING')).wait()
gateway1.Popen((IPTABLES, '-t', 'nat', '-A', 'POSTROUTING', '-o', g1_if_0_name, '-j', 'MINIUPNPD-POSTROUTING')).wait()
gateway1.Popen((IPTABLES, '-t', 'nat', '-A', 'POSTROUTING', '-o', g1_if_0_name, '-j', 'MASQUERADE')).wait() gateway1.Popen((IPTABLES, '-t', 'nat', '-A', 'POSTROUTING', '-o', g1_if_0_name, '-j', 'MASQUERADE')).wait()
gateway1.Popen((IPTABLES, '-t', 'nat', '-N', 'MINIUPNPD')).wait() gateway1.Popen((IPTABLES, '-t', 'nat', '-N', 'MINIUPNPD')).wait()
gateway1.Popen((IPTABLES, '-t', 'nat', '-A', 'PREROUTING', '-i', g1_if_0_name, '-j', 'MINIUPNPD')).wait() gateway1.Popen((IPTABLES, '-t', 'nat', '-A', 'PREROUTING', '-i', g1_if_0_name, '-j', 'MINIUPNPD')).wait()
......
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