testing: Migrate ikev2-stroke-bye scenarios to vici
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
sun::iptables-restore < /etc/iptables.rules
|
||||
alice::iptables-restore < /etc/iptables.rules
|
||||
venus::iptables-restore < /etc/iptables.rules
|
||||
moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -p tcp -j SNAT --to PH_IP_MOON
|
||||
moon::iptables -t nat -A POSTROUTING -o eth0 -s PH_IP_ALICE -p udp --sport 500 -j SNAT --to PH_IP_MOON:510
|
||||
moon::iptables -t nat -A POSTROUTING -o eth0 -s PH_IP_VENUS -p udp --sport 500 -j SNAT --to PH_IP_MOON:520
|
||||
moon::iptables -t nat -A POSTROUTING -o eth0 -s PH_IP_ALICE -p udp --sport 4500 -j SNAT --to PH_IP_MOON:4510
|
||||
moon::iptables -t nat -A POSTROUTING -o eth0 -s PH_IP_VENUS -p udp --sport 4500 -j SNAT --to PH_IP_MOON:4520
|
||||
# NAT client traffic to distinct virtual IPs
|
||||
sun::iptables -t nat -A POSTROUTING -o eth1 -m mark --mark 10 -j SNAT --to 10.3.0.10
|
||||
sun::iptables -t nat -A POSTROUTING -o eth1 -m mark --mark 20 -j SNAT --to 10.3.0.20
|
||||
# mark the return traffic accordingly
|
||||
sun::iptables -t mangle -A PREROUTING -d 10.3.0.10 -j MARK --set-mark 10
|
||||
sun::iptables -t mangle -A PREROUTING -d 10.3.0.20 -j MARK --set-mark 20
|
||||
sun::systemctl start strongswan
|
||||
alice::systemctl start strongswan
|
||||
venus::systemctl start strongswan
|
||||
sun::expect-connection alice
|
||||
sun::expect-connection venus
|
||||
alice::expect-connection nat-t
|
||||
alice::swanctl --initiate --child nat-t
|
||||
venus::expect-connection nat-t
|
||||
venus::swanctl --initiate --child nat-t
|
||||
Reference in New Issue
Block a user