Open Kim-Gang-Min opened 2 years ago
iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
cat <<'EOF' >/etc/network/if-up.d/iptables
iptables-restore < /etc/iptables/rules.v4 EOF
pre-up iptables-restore < /etc/iptables.rules
pst-down iptables-save -c > /etc/iptables.rules
iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
cat <<'EOF' >/etc/network/if-up.d/iptables
!/bin/sh
iptables-restore < /etc/iptables/rules.v4 EOF