Home > OS >  Consult, Firewalld only to certain IP firewall specified port.
Consult, Firewalld only to certain IP firewall specified port.

Time:11-11

Such as topic, because of the firewall itself exists many completely put on command, so only add release rule is unable to reach the purpose of put on, I tried to use the

They banned all the device access 8080
Then configuration rules, put through designated IP access: for example 192.168.1.100


But I use 192.168.1.100 again: 8080 access when they visit

CodePudding user response:

The source IP address is a source, should be your browser's IP to the machine, see what you say, 192.168.1.100 should be your 8080 IP port machine

CodePudding user response:

First, the last pass, the order is wrong,

CodePudding user response:

Because the firewall policy is more, if you add a a drop rule will be very trouble, I think the best way is to first close the port, put through again to specify the IP, but not practice,

refer to the second floor wisewoman response:
open first, last, the order is wrong,

CodePudding user response:

reference 1st floor zhouchao6 response:
the source IP address is a source, should be your browser's IP to the machine, see what you say, 192.168.1.100 should be your 8080 port machine IP


168 1 100 192 is to be put through the machine IP, firewall configuration is another machine

CodePudding user response:

To accept the rules before refused to rule

CodePudding user response:

reference A773955449 reply: 3/f
because the firewall policy is more, if you add a a drop rule will be very trouble, I think the best way is to first close the port, put through again to specify the IP, but not practice,

Quote: refer to the second floor wisewoman response:
open first and the last pass, the order is wrong,

Behind the drop, will not continue to ah, how to use

CodePudding user response:

Release which is writing which, there is no written prevents directly, do not need to manually add the drop strategy,

CodePudding user response:

You try to change the rules at the back

CodePudding user response:

1. The iptables -i INPUT -p TCP -- dport 8080 - j DROP
2. The iptables -i INPUT -s 192.168.1.100 -p TCP -- dport 8080 - j ACCEPT

CodePudding user response:

Should be first to accept what you want, do not need to manually add the drop strategy