• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Firewall not generating rules correctly

TheBug

New Pleskian
Hi,

I am using the plesk firewall and trying to set up SSH rule which only allows from my IP but deny from everywhere else.
In previous versions this worked fine by adding an ip selecting Allow from selected sources, deny from others and the icon in the rules would be orange with the lines

allow incoming from xxx.xxx.xxx.xx
Deny incoming from all others

However this no longer works as the deny from all others is not appearing and is not being generated in the iptables by plesk.
How can I fix this?

Thanks
 
You might consider adding these lines over the command prompt:

Code:
iptables -A INPUT -i eth0 -s XXX.XXX.XXX.XXX --dport 22 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i eth0 -j DROP

With these modifications, you have to add a rule for each allowed IP ( XXX.XXX.XXX.XXX ), the rest will be dropped. Please be carefull with this setting, because a false entry might lock you out completly. Think about adding the server ip(s) as well as 127.0.0.1/32 . Depending on your OS, you might as well consider reading the man pages for iptables.
 
Back
Top