Question: As a result of scientific research requirements, most of our department did not use Windows system, and the use of Linux, is not accustomed to boot is a dark interface, like the legendary DOS. Fortunately, the scientific research of those software has instructions, but the firewall on Linux did not mention, I am very worried about the worm or backdoor intrusion, how to start it?
Answer: Because you did not say which Linux distribution, but the bottom of the Linux basic things are the same, so small to give you the method for the vast majority of distributions are effective. Linux itself has a firewall named "Iptables". The Dark One you said is the terminal. Enter the following command in the terminal to open the firewall:
Chkconfig iptables on
If the firewall is closed, enter:
Chkconfig iptables off
All two of these commands have to be restarted for the system to take effect.
You can use the service command if you do not want to take effect immediately by restarting the system. The disadvantage is that the settings will be lost when you reboot the system.
Firewall turned on:
Service Iptables Start
To turn off the firewall:
Service Iptables Stop
To set a switch on some ports in the firewall, modify the edit/etc/sysconfig/iptables file, such as SSH Port 22, which can be added as follows:
-A rh-firewall-1-input-m state――state new-m tcp-p tcp――dport 22-j ACCEPT
In short, "ptables" function is very powerful, here can not be said clearly, specifically please refer to the "ptables" information.