Answers for "iptables allow ip on port"

4

iptables open port

sudo iptables -A INPUT -p tcp --dport xxxx -j ACCEPT
Posted by: Guest on August-17-2020
0

iptables block incoming port

iptables -A INPUT -p tcp --dport 8000 -s 1.2.3.4 -j ACCEPT
iptables -A INPUT -p tcp --dport 8000 -j DROP
Posted by: Guest on July-02-2020
0

iptables allow port from anywhere

sudo iptables -A INPUT -p tcp --dport 443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 443 -m conntrack --ctstate ESTABLISHED -j ACCEPT
Posted by: Guest on January-02-2021
0

iptables allow port from anywhere

sudo iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -p tcp --sport 80 -m conntrack --ctstate ESTABLISHED -j ACCEPT
Posted by: Guest on January-02-2021

Browse Popular Code Answers by Language