- NAT rule for port 25
- On OPNSense, go to Firewall → NAT → Port Forward and create a new rule.
- Interface: your WAN
- TCP/IP: IPv4
- Protocol: TCP
- Destination: WAN address
- Destination port range: SMTP to SMTP (or select other and manually type in 25 to 25)
- Redirect target IP: the IP of your mail server
- Redirect target port: SMTP
- Log it in for debugging purposes
- Everything else leave as default or tweak as per your needs.
- NAT rule for port 993 (IMAPS)
- On OPNSense, go to Firewall → NAT → Port Forward and create a new rule.
- Interface: your WAN
- TCP/IP: IPv4
- Protocol: TCP
- Destination: WAN address
- Destination port range: IMAPS to IMAPS (or select other and manually type in 993 to 993)
- Redirect target IP: the IP of your mail server
- Redirect target port: IMAPS
- Log it in for debugging purposes
- Everything else leave as default or tweak as per your needs.
- NAT Rule for port 465 (SMPTS)
- As above, use port 465 or SMTPS
- Upon creation of the NAT rules, remember to click on the ‘Apply’ button in OPNSense to activate it.