1 (edited by davidzamoraruiz1988 2019-05-10 00:55:56)

Topic: How to enable Firewall for dany access http and https?

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? Easy
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PostgreSQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro?No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I would like to activate the Ubuntu Firewall (UFW) so that when trying to access the panel (mail.domain.com) says that the page does not exist and can only access from my IP, and the rest of the mail works fine.

I have active from Nginx but I would like not to load the page to anyone.

How can I do this?

Thanks.

2

Re: How to enable Firewall for dany access http and https?

Currently iRedMail runs on iptables. Its a little harder to configure, but works just the same.

See the below link to add to your nginx configuration for that domain below.

https://stackoverflow.com/questions/843 … nginx-conf

3

Re: How to enable Firewall for dany access http and https?

The firewall rule is /etc/default/iptables on Debian/Ubuntu (configured by iRedMail), you just need to add new rules in this file then restart "iptables" service.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

4

Re: How to enable Firewall for dany access http and https?

ZhangHuangbin wrote:

The firewall rule is /etc/default/iptables on Debian/Ubuntu (configured by iRedMail), you just need to add new rules in this file then restart "iptables" service.

What rule do I have to set to accept http/https traffic from just one ip and block the rest? Thanks.

5

Re: How to enable Firewall for dany access http and https?

wylel wrote:

Currently iRedMail runs on iptables. Its a little harder to configure, but works just the same.

See the below link to add to your nginx configuration for that domain below.

https://stackoverflow.com/questions/843 … nginx-conf

I've got that. It's not iptables, it's blocking raffic from Nginx.

6

Re: How to enable Firewall for dany access http and https?

Hi. I find the file and i can edit. Now working fine. Thanks a lot.