Use iptables under ubuntu

Add iptables rules under Ubuntu##

Requirements: The demo1 environment allows all access to the internal network, and only provides port 80 externally

Install iptables

Create a file to save rules

To prevent the rule from being lost when restarting, add a save trigger script

Example firewall rules

I am used to modifying the firewall rules directly to modify the configuration file. The contents of the file are as follows:

Copy these contents to the empty file iptables.rules we created earlier

Loading rules

After adding the rules, you need to load the configuration

View rules

Chain FORWARD (policy ACCEPT) target prot opt source destination

Chain OUTPUT (policy ACCEPT) target prot opt source destination

Recommended Posts

Use iptables under ubuntu
Use sublime tex under ubuntu
Use of mediawiki under ubuntu
Use QQ under Ubuntu 13.10, suitable for 14.10
Ubuntu use notes
ubuntu zip/unzip use
Use mendeley to insert references under ubuntu
Install apache+PHP under Ubuntu
Install python3.6 under Ubuntu 16.04
Summary of methods to use Evernote under Ubuntu 14.04
Install mysql under Ubuntu 16.04
Install Thrift under ubuntu 14.10
Install OpenJDK10 under Ubuntu
Install Caffe under Ubuntu 14.04
Use rsync to remotely backup data under Ubuntu
Start working under ubuntu
Use supervisor in ubuntu
[python] python2 and python3 under ubuntu
2018-09-11 Install arduino under Ubuntu
Use doxygen to generate API documentation under Ubuntu 12.04
LNMP installation under Ubuntu
Network configuration under Ubuntu
ubuntu iptables firewall guide
Install ROS under ROS Ubuntu 18.04[2]
Install MySQL under Ubuntu
ubuntu 14.04 16.04 18.04 use Alibaba source
Install Yarm-PM2 under Ubuntu
Installation and use of GDAL in Python under Ubuntu
Cpp web (1) Install and use Crow service under Ubuntu
Django&MySQL environment deployment under Ubuntu 14.04
Deploy FTP server under ubuntu
Solve Unment dependencies under ubuntu
Use of Anaconda in Ubuntu
Open SSH service under Ubuntu
Modify shortcut keys under Ubuntu 18.04
Install server-side Shadowsocks under Ubuntu 16.04
Open SSH service under Ubuntu
DNS service construction under Ubuntu
Use virtualbox to deploy ubuntu
Install rgl package under Ubuntu
Talk about | Install and use Linux system Ubuntu under Win10
Use expect to realize screen multi-window boot operation under ubuntu
Install and use dig under ubuntu/debian
How to use hanlp in ubuntu
Use Nginx and u under CentOS
Use disk quota in ubuntu multi-user
Installation of deb package under Ubuntu
Deploy the mail system under Ubuntu 19.10
How to compile ijkplayer-android under ubuntu
Install 3 single-cell R packages under Ubuntu
CentOS7.3 install iptables and detailed use
Ubuntu16.04 configuration OpenCV3.4.2 and basic use
Install and deploy Gerrit under Ubuntu
Install MySQL under Ubuntu 18.04 (graphic tutorial)
Install JDK1.8 original under Ubuntu Kylin
Redis installation under ubuntu and windows
Small tool: install screenshot tool under ubuntu
Install nodejs and npm under Ubuntu 16.04
Python Chinese encoding setting under ubuntu
Install and use docker under CentOS 6.8
Ubuntu 16.04 installation graphic tutorial under VMware 12