Setting up a firewall on a Linux proxy server
Summary:Generally speaking, there are two strategies for implementing Linux firewall functionality. One approach is to first completely prohibit all input, ou…
This book is available as an e-book in EPUB format
PayPal sponsors this website for any amount. I will send you an EPUB e-book via email. Please send me an email
Email: shuxueha@outlook.com
PayPal: https://paypal.me/zhipinglei
You can also scan the PayPal QR code below to sponsor
You can also purchase this book on Amazon: click to enter the Amazon official website
Generally speaking, there are two strategies for implementing Linux firewall functionality. One approach is to first completely prohibit all input, output, and forwarding of data packets, and then gradually enable various service functions according to the specific needs of the user. The characteristic of this approach is high security, but it must comprehensively consider the various service functions required by users, without any omissions, and require system administrators to clearly know which services and ports need to be opened to implement a certain service and function. The second method is to first enable all input and output data packets by default, and then disable certain dangerous packets, IP spoofing packets, broadcast packets, ICMP service type attacks, etc; For application layer services such as HTTP, Sendmail, Pop3, FTP, etc., they can be selectively started or installed. Although this method is not as secure as the first method, it is relatively easy to configure and does not require a deep understanding of the details of the ipchains command to configure a basic firewall system.
The proxy server I manage is IBM's Netfinity3000, installed with RedHat Linux 6.2 and Squid-2.3, and has two network cards. The external network card is eth0 (211.98.126.180) and the internal network card is eth1 (192.168.0.1). The client's IP address is 192.168.0.xxx. According to the second method, a firewall was set up, and the specific process is as follows:
After installing the system, log in as root and create a script called firewall. rules using vi in the/etc/rc. d/directory; After creation, execute the command chmod 755 firewall.rules to ensure that it is an executable file; Then open the/etc/rc.d/rc.local file with vi and add a line of/etc/rc.d/firewall.rules to ensure that the machine can execute the set firewall rules every time it starts up.
The content of the firewall.rules file is omitted.
If your machine only has one network card and is connected to the internet through dial-up with a modem, the network card connecting to the internal network should be eth0, the IP address may be 192.168.0.1, and the external interface is ppp0. You only need to change eth0 in the firewall.rules file content to ppp0. After setting the above firewall rules, you can disable all unnecessary services in/etc/inetd.conf and only keep FTP and Telnet; Simultaneously set/etc/hosts.allow and/etc/hosts.deny, allowing only certain internal management users to log in to the firewall. The above methods have successfully run in the environment where the author is located and solved the problem of sending and receiving emails in Outlook Express.
Specific features of Xintu VPN/PPTP-VPN. Strong security performance, without any logs. Good stability, low latency
High encryption ensures the protection of user privacy. All IPs are clean and fast IPs, and will never be banned due to IP issues
If you encounter any problems during use, please feel free to contact our customer service for assistance, and they will solve your problems for you
| High-speed VPN | Fast VPN | Preferred Accelerator VPN | Reliable VPN |
| High quality VPN | Old fashioned VPN | Stable VPN(Recommend) | Smooth VPN |

