linux - debian 8 iptables-persistent -
i have vps debian 8 jessie x64 stable release. after installation im trying configure iptables (like in debian 7).
apt-get install iptables-persistent
executed succesefully, packets installed. when im trying
service iptables-persistent start
im getting error says thar service iptables-persistent unrecognized
halp!
persist ip tables debian/ubuntu
to persist changes make iptables rules, following.
install iptables-persistent:
sudo apt-get install -y iptables-persistent
make changes want iptables rules, eg
sudo iptables -t nat -a prerouting -p tcp --dport 80 -j redirect --to-ports 8080
then run
sudo dpkg-reconfigure -y iptables-persistent
the rules should persist after reboot now.
extra info
the dpkg-reconfigure causes iptables-persistent again @ install, save current iptables file using command like:
iptables-save >/etc/iptables/rules.v4 ip6tables-save >/etc/iptables/rules.v6
the iptables-persistent package causes os run following on reboot.
iptables-restore < /etc/iptables/rules.v4 ip6tables-restore < /etc/iptables/rules.v6
hope helps : )
Comments
Post a Comment