SpringBoot實戰電商項目mall(20k+star)地址: https://github.com/macrozheng/mall
Linux中有兩種防火牆軟件,ConterOS7.0以上使用的是firewall,ConterOS7.0如下使用的是iptables,本文將分別介紹兩種防火牆軟件的使用。git
systemctl start firewalld
systemctl stop firewalld
systemctl status firewalld
systemctl enable firewalld
systemctl disable firewalld
firewall-cmd --reload
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --list-ports
firewall-cmd --zone=public --remove-port=8080/tcp --permanent
因爲CenterOS7.0以上版本並無預裝Iptables,咱們須要自行裝。
yum install iptables
yum install iptables-services
systemctl start iptables.service
systemctl stop iptables.service
systemctl status iptables.service
systemctl enable iptables.service
systemctl disable iptables.service
iptables -L -n
iptables -t nat -L -n
iptables -F
iptables -X
iptables -Z
iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
iptables -L INPUT --line-numbers -n
iptables -D INPUT 1
mall項目全套學習教程連載中,關注公衆號第一時間獲取。github