mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
S2S VPN: CS-16092: Add ESP rule to iptables
Otherwise the other end cannot initiate connection.
This commit is contained in:
parent
aa64dc5fdf
commit
20ccb6c1cb
@ -68,6 +68,7 @@ check_and_enable_iptables() {
|
||||
then
|
||||
sudo iptables -A INPUT -i $outIf -p udp -m udp --dport 500 -j ACCEPT
|
||||
sudo iptables -A INPUT -i $outIf -p udp -m udp --dport 4500 -j ACCEPT
|
||||
sudo iptables -A INPUT -i $outIf -p 50 -j ACCEPT
|
||||
# Prevent NAT on "marked" VPN traffic, so need to be the first one on POSTROUTING chain
|
||||
sudo iptables -t nat -I POSTROUTING -t nat -o $outIf -m mark --mark $vpnoutmark -j ACCEPT
|
||||
fi
|
||||
@ -92,6 +93,7 @@ check_and_disable_iptables() {
|
||||
#Nobody else use s2s vpn now, so delete the iptables rules
|
||||
sudo iptables -D INPUT -i $outIf -p udp -m udp --dport 500 -j ACCEPT
|
||||
sudo iptables -D INPUT -i $outIf -p udp -m udp --dport 4500 -j ACCEPT
|
||||
sudo iptables -D INPUT -i $outIf -p 50 -j ACCEPT
|
||||
sudo iptables -t nat -D POSTROUTING -t nat -o $outIf -m mark --mark $vpnoutmark -j ACCEPT
|
||||
fi
|
||||
return 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user