Preface The server used by the blogger was purchased from Alibaba Cloud. In fact, Alibaba Cloud has provided us with security policies for our use, but if it is the company's own server, or our own virtual machine, etc. You still need to check how to configure the firewall and the whitelist. 1. Alibaba Cloud's server does not have a firewall itself, but we can install an IPtable firewall (here Alibaba Cloud's server system is Centos). In this case, the firewall and the whitelist configured by Alibaba Cloud URL need to take effect at the same time. 1. Server Firewall 1.1. The following is the initial firewall configuration vim /etc/sysconfig/iptables # sample configuration for iptables service # you can edit this manually or use system-config-firewall # please do not ask us to add additional ports/services to this default configuration *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT 1.2. Configure whitelist and exposed ports 1.2.1. Expose ports 22, 80, and 8080 1.2.2, add whitelist 116.90.86.196, 116.90.86.197 Be sure to enter your current IP address, be careful not to be able to log in # sample configuration for iptables service # you can edit this manually or use system-config-firewall # please do not ask us to add additional ports/services to this default configuration *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] #Define whitelist variable name -N whitelist #Set the whitelist ip segment -A whitelist -s 116.90.86.196 -j ACCEPT -A whitelist -s 116.90.86.197 -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p icmp -j whitelist -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j whitelist -A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -A INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT 2. Alibaba Cloud whitelist and port exposure 2.1 Security Group Configuration 2.3. Configure IP and port 2.3.1, 0.0.0.0/0 means unlimited IP 2.2.2. Cloning is to copy one, and then delete the previous one The above article about Linux server configuration IP whitelist to prevent remote login and port exposure is all the content that the editor shares with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Windows 10 + mysql 8.0.11 zip installation tutorial detailed
>>: WeChat Mini Program User Authorization Best Practices Guide
Copy code The code is as follows: html { overflow...
I. Strict Mode Explanation According to the restr...
I've been using redis recently and I find it ...
Event response refresh: refresh only when request...
Table of contents As a global variable Variable H...
Table of contents 1. Get the first link first 2. ...
Generally, we rarely meet HR, but once we do, it c...
Table of contents 1. Self-enumerable properties 2...
Table of contents 1. Open source warehouse manage...
Recently, when I turned on my computer, I saw tha...
Count(*) or Count(1) or Count([column]) are perha...
I installed a new version of MySQL (8.0.21) today...
Table of contents Overview in operator refinement...
Table of contents background LIMIT Optimization O...
VMware Tools is a tool that comes with VMware vir...