The easy way is to use iptables-persistent.

Install iptables-persistent:

sudo apt-get install iptables-persistent

After it's installed, you can save/reload iptables rules anytime:

sudo /etc/init.d/iptables-persistent save 
sudo /etc/init.d/iptables-persistent reload

Ubuntu 16.04 Server

The installation as described above works without a problem, but the two commands for saving and reloading above do not seem to work with a 16.04 server. The following commands work with that version:

sudo netfilter-persistent save
sudo netfilter-persistent reload



相关文章:

  • 2021-11-15
  • 2021-06-29
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2021-08-11
  • 2022-12-23
猜你喜欢
  • 2021-07-01
  • 2021-08-28
  • 2021-08-06
  • 2021-10-21
  • 2022-12-23
  • 2021-11-01
  • 2021-08-06
相关资源
相似解决方案