08 Iptables firewall and Firewalld

08 Iptables firewall and Firewalld

NIC configuration methods

1、vim /etc/sysconfig/network-scripts/ifcfg-eno1677728

systemctl restart network

2, nmtui

3、nm-connection-editor

Allowing the release of ACCEPT

Reject REJECT

Refused DROP

Log LOG

iptables -L to list all rules

iptables -F Empty matching rule

iptables -A written subsequently to the rule

iptables -P INPUT DROP modify the matching rule

iptables -I INPUT -s 192.168.10.1/24 -p tcp --dport 22 -j ACCEPT inserted in front of a matching rule

iptables -D INPUT 2 second deletion policy

From top to bottom match match will end to

Disable port number

--dport 22

--dport 80

--dport 22:80

[root@linuxprobe ~]# iptables -I INPUT -p tcp --dport 12345 -j REJECT
[root@linuxprobe ~]# iptables -A INPUT -p tcp --dport 1000:1024 -j REJECT

Guess you like

Origin www.cnblogs.com/gerenboke/p/12604377.html