We are already in the borderless network age. Are you confused? What is a borderless network? What is the difference between a borderless network and a previous network ?...... 1. enable the firewall and disable/etc/init for unnecessary ports. d/iptablesstart // simple rules are as follows:
We are already in the borderless network age. Are you confused? What is a borderless network? What is the difference between a borderless network and a previous network ?......
1. enable the firewall and disable unnecessary ports
| /Etc/init. d/IptablesStart // simple rules are as follows. /Sbin/iptables-F /Sbin/iptables-a input-p tcp-I vnet0 Cdport ssh-j ACCEPT /Sbin/iptables-a input-p tcp-I vnet0 Cdport 80-j ACCEPT /Sbin/iptables-a input-I vnet0-m state CstateESTABLISHED, RELATED-j ACCEPT /Sbin/iptables-a input-p ICMP-j DROP /Sbin/iptables-a input-I vnet0-j DROP |
Several iptables are simple. after modification, restart iptables.
| /Etc/init. d/iptables restart |
2. change the ssh Port. Note that the firewall should enable this port. Otherwise, it is forbidden. in principle, change it to port 5000 or above.
| Vi/etc/ssh/sshd_config // change the number following the search Port to the Port number you want. delete it if there is a # number before the Port. |
3. prohibit root login. Be sure to create a common user first. Otherwise, it will be tragic.
| Vi/etc/ssh/sshd_config // search for PermitRootLogin and change "yes" to "no". if there is a # sign in front, delete it. |
Second, restart ssh after completing step 3.