In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Ufw is a simple firewall configuration tool under Ubuntu, and the bottom layer still calls iptables to deal with it. Although the function is simple, it is more practical for desktop applications. It has all the basic common functions and is easy to use.
1. Installation
Sudo apt-get install ufw
two。 Enable
Sudo ufw enable
Sudo ufw default deny
After running the above two commands, the firewall is turned on and automatically turned on when the system starts.
Turn off all external access to the local machine, but the external access to the local machine is normal.
3. Enable / disable
Sudo ufw allow | deny [service]
Open or close a port, for example:
Sudo ufw allow smtp allows all external IP access to the native 25/tcp (smtp) port
Sudo ufw allow 22/tcp allows all external IP access to the native 22/tcp (ssh) port
Sudo ufw allow 53 allows external access to port 53 (tcp/udp)
Sudo ufw allow from 192.168.1.100 allows this IP to access all native ports
Sudo ufw allow proto udp 192.168.0.1 port 53 to 192.168.0.2 port 53
Sudo ufw deny smtp prohibits external access to smtp services
Sudo ufw delete allow smtp deletes one of the rules established above
4. View firewall status
Sudo ufw status
For ordinary users, you only need to set the following settings:
Sudo apt-get install ufw
Sudo ufw enable
Sudo ufw default deny
The above three commands are secure enough. If you need to open some services, use sudo ufw allow to open them.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.