1. 程式人生 > 其它 >Ubuntu開放指定埠

Ubuntu開放指定埠

技術標籤:ubuntu_Linux

$ iptables -I INPUT -p tcp --dport 80 -j ACCEPT
$ iptables-save
//永久
$ sudo apt-get install iptables-persistent
$ sudo netfilter-persistent save
$ sudo netfilter-persistent reload
//檢視埠是否開啟
sudo -s
lsof -i:308888