Ubuntu开启所有端口


5个月前 426次点击 来自 Linux

开放所有端口:

iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F
iptables-save

开放指定端口:

iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

使用iptables-persistent持续化规则:

apt install iptables-persistent
netfilter-persistent save
netfilter-persistent reload

Made with in Shangrao,China By Devler.

Copyright © Devler 2012 - 2022

赣ICP备19009883号-1

Top ↑