5

I have a Zimbra server and the admin port, 7071, is open to the world. I had someone try to get into it yesterday and that locked the account.

I was wondering if I can block all access to this port with the exception of a few ip addresses to allow me in.

deny all/allow ip range?

Is that possible?

2 Answers 2

5

You can use iptables for this

iptables -A INPUT -p tcp --dport 7071 -s 1.2.3.4 -j ACCEPT
iptables -A INPUT -p tcp --dport 7071 -j DROP
1
  • Thank you for your response! I'll read up on iptables as I'm not that familiar with them.
    – ErocM
    Mar 4, 2016 at 19:15
0

In my experience, ufw worked better than iptables. I was using Ubuntu 18.04.

sudo ufw enable
sudo ufw allow from 1.2.3.4 to any port 7071
sudo ufw deny 7071

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .