Ubuntu Shutdown Firewall

Source: Internet
Author: User
Tags iptables

1. Turn off the Ubuntu firewall UFW disable
2. Uninstall the iptables apt-get remove iptables


1. Use the IPTABLES-F command to turn off the firewall, but before using this command, do remember to use Iptables-l to view the default target,iptables-f of all the chains in your system. This command just clears all the rules, Just don't really close iptables. Imagine if your chain default target is drop, you have rules to allow certain ports, but once the iptables-l is applied and all rules are cleared, the default target blocks any access. Of course include remote SSH Admin server for you.
So my recommended shutdown Firewall command is

Iptables-p INPUT ACCEPT

Iptables-p FORWARD ACCEPT

Iptables-p OUTPUT ACCEPT

Iptables-f

In short, when you want to make any changes on your server, it is best to have a test environment that has been fully tested and then applied to your server. In addition, to use good iptables, it is necessary to understand the operating principle of iptables, Know what to do with each packet iptables. So that we can write the rules accurately and avoid unnecessary trouble.

2. By default, Ubuntu has no firewall, unless you install it yourself, how to delete it.
If it's an enabled iptables, you can delete it.

sudo apt-get remove iptables

Don't remember Apt-get to remove it, some days it's no use for Ubuntu

 iptables is a kernel module can not delete the drop
Now check your iptables rule
sudo iptables-l
sudo iptables-t nat-l
If it's all empty, it's not a iptables problem.
If there are many rules, clear the rule and modify the default policy
sudo iptables-f
sudo iptables-t nat-f
sudo iptables-p accep T
sudo iptables-t nat-p ACCEPT

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.