Answer the question
In order to leave comments, you need to log in
IPTables, how to allow any requests, only from a specific IP range?
Hello.
It is necessary to make sure that a certain IP range, for example 83.116.*.*, can send requests to port 80 and that’s all, only to 80.
Also, a certain 1 IP can send requests to any port, that is, there would be no restrictions on it.
So it turns out that all other IPs will be ignored. This is all on TCP, UDP is completely closed for me.
Thank you!
Answer the question
In order to leave comments, you need to log in
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -p tcp -s 83.116.0.0/16 --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -s xxxx -j ACCEPT
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question