-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation request: Iptables for portmapping #565
Comments
My two cents would be that we didn't need to modify Also we don't really work with IPv6 inbound at the minute, we have it connected for outbound traffic so I can't comment on that part. |
I've updated my comments for the sysctl conf. |
Using iptables means that the server is still listening on port 25 but also gets the traffic from 2525. The server is still capable of receiving incoming email on the automated psrp addresses. Using 2525 means our client websites are guaranteed to be able to send email using Postal. Our sole use of Postal is transactional which means that bounces are pretty low overall. |
I'm now running postal SMTP on port 25 and forwarding 2525 => 25 as i think @willpower232 is doing. after googling around a bit, I'm now using the following simplified UFW rules at the top of both
I'm doing this to avoid specifying particular IP's / interfaces in the ruleset because I've got several IPV4 and IPV6 addresses active and all pointing at the postal server. Everything is working as expected, but if anyone knows of a reason that the above ruleset is problematic or a reason why the IP's / interfaces should be specified, please let me know. |
As long as you're happy to receive SMTP connections on all the IP addresses, I don't think theres really a problem. |
Hello, I've redirected the traffic on port 2525 to 25, however how do i open that port? I mean, if a do a telnet to 2525 it doesn't respond at all: A simple
what else do i have to do to make it work? do i have to restart postal or something? refresh the iptables in any way? |
Is Postal definitely listening on |
That seems to be correct so there may be another firewall blocking your connection |
You were right @willpower232, I had another supervisor firewall... Reviewing this issue, I have realised that SMTP is only listening in tcp6 port (as you can see in the screenshot), unlike other services like (sshd, beamn.smp, epmd) that are listening on both protocols, is that correct? should I do/add anything in the smtp_config section? thanks |
By default, listening on IPv6 listens on IPv4 as well so there is no problem there. |
The smtp server does not support binding to multiple ports. Which is fine, but I've seen quite some issues on this in the issue tracker - and it took me some time figure this out. Perhaps it's an idea to make a note of it in the documentation (even though you can argue firewall management is out of scope for postal's documentation)
I think @willpower232 's advice should be documented in the install docs, I would recommend the section
"Configuring Postal SMTP" to have added:
There are my notes on the topic:
IPv4 Port mapping
IPv6 Port mapping example:
UFW IPv4 Port mapping
For ipv4, add to the top of
/etc/ufw/before.rules
:UFW IPv6 Port mapping
For ipv6, add to the top of
/etc/ufw/before6.rules
:Restart ufw to add the different rules:
service ufw restart
Don't forget to allow access to port 587:
ufw allow 587/tcp
The text was updated successfully, but these errors were encountered: