O
O
Oleg3652018-11-20 14:28:23
linux
Oleg365, 2018-11-20 14:28:23

How to block all tcp traffic on port 80 in iptables except for ip 1.1.1.1/32 for example?

Add to table with minimal CPU load.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2018-11-20
@Oleg365

# iptables -A INPUT -p tcp --dport 80 -j DROP
# iptables -A INPUT -s 1.1.1.1/32 -m state --state NEW -p tcp --dport 80 -j ACCEPT

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question