列表 4. 允许 IPSec 的 iptables 规则

# iptables -A INPUT -p udp -m udp --sport 500 \
--dport 500 -j ACCEPT
# iptables -A INPUT -p 50 -j ACCEPT
# iptables -A INPUT -p 51 -j ACCEPT
# iptables -A OUTPUT -p udp -m udp --sport 500 \
--dport 500 -j ACCEPT
# iptables -A OUTPUT -p 50 -j ACCEPT
# iptables -A OUTPUT -p 51 -j ACCEPT
© . All rights reserved.