How to setup iptables to protect Ports

Hello,

I have whitelisted only my IP
on Hestia Port 8083 and FTP 21,12000-12100 and SSH 22,

  1. Can I also set my ip on Ports [ 143,993 - 110,995]
    25,465,587

  2. How I can allow my IP to login on phpmyadmin, and webmail.

Because I see some logs:

2022-12-25 00:07:38 no host name found for IP address 20.13.152.59
2022-12-25 00:10:59 no host name found for IP address 146.70.83.194
2022-12-25 00:11:05 dovecot_login authenticator failed for ([10.13.37.121]) [146.70.83.194]: 535 Incorrect authentication data (set_id=alexandr)
2022-12-25 00:36:47 Start queue run: pid=3726654
2022-12-25 00:36:47 End queue run: pid=3726654
2022-12-25 00:37:11 no host name found for IP address 195.206.105.52
2022-12-25 00:37:21 dovecot_login authenticator failed for ([10.13.111.133]) [195.206.105.52]: 535 Incorrect authentication data (set_id=gemini)

Unless you want to disable sending and receiving email you can’t block the smtp ports.

I suggest setting up a iplist found in /usr/local/hestia/install/deb/firewall/ipset/blacklist.sh

See instructions below

https://development.hestiacp.com/docs/server-administration/firewall.html#how-do-i-setup-an-ipset-blacklist-or-whitelist

phpmyadmin / webmail can only be protected by .htaccess

I already setup IPlist to block bad IPs, but spammer and hacker buying new vps everyday,

I only want to allow smtp ports, but port like for imop/pop 143,993 - 110,995,

Please tell me location, and example, please.

imap and pop3 ports can be blocked

Please tell me location, and example, please.

I have never configured it my self or have it documented it myself.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.