Linux?·???????????
???????????? ???????[ 2017/5/18 9:58:26 ] ?????????????? Linux
??????????centos centos7?汾????????iptables??centos7?汾??????firewalld??
????iptables???????
????iptables?????????????Linux?????????????????????????NAT?? IPTABLES?????????
????iptables -L -n
??????????й???
????iptables -F
???????????ip ???????????????ip?????????????????????????????????????????????ip?????????????
????BLOCK_THIS_IP="x.x.x.x"
????iptables -A INPUT -i eth0 -p tcp -s "$BLOCK_THIS_IP" -j DROP
??????????????
????iptables -t nat -A PREROUTING -p tcp -d 192.168.102.37 --dport 422 -j DNAT --to 192.168.102.37:22
????DoS???????? ??????????limit???????????????iptables???????DoS??????????
????iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT
????firewalld???????
????????? systemctl start firewalld ?????? systemctl status firewalld ???? systemctl disable firewalld ????? systemctl stop firewalld
???????汾?? firewall-cmd --version ???????? firewall-cmd --help ??????? firewall-cmd --state ?????д?????? firewall-cmd --zone=public --list-ports ???·???????? firewall-cmd --reload ?????????: firewall-cmd --get-active-zones ???????????????? firewall-cmd --get-zone-of-interface=eth0 ??????а???firewall-cmd --panic-on ?????????? firewall-cmd --panic-off ????????? firewall-cmd --query-panic
????????????????????? ??? firewall-cmd --zone=public --add-port=80/tcp --permanent ??--permanent??Ч????д??????????Ч?? ???????? firewall-cmd --reload ?? firewall-cmd --zone= public --query-port=80/tcp ??? firewall-cmd --zone= public --remove-port=80/tcp --permanent
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11