so I put a mail proxy in place instead of having UCS on ec2, using wireguard to create a connection between the proxy and main UCS instance.
Using ufw to pre routing.
/etc/ufw/before.rules
Port Forwarding
-A PREROUTING -i enp3s0 -d 12.34.56.78 -p tcp --dport 25 -j DNAT --to-destination 10.10.10.2:25
-A PREROUTING -i enp3s0 -d 12.34.56.78 -p tcp --dport 587 -j DNAT --to-destination 10.10.10.2:587
#-A PREROUTING -i enp3s0 -d 12.34.56.78 -p tcp --dport 465 -j DNAT --to-destination 10.10.10.2:465
-A PREROUTING -i enp3s0 -d 12.34.56.78 -p tcp --dport 143 -j DNAT --to-destination 10.10.10.2:143
-A PREROUTING -i enp3s0 -d 12.34.56.78 -p tcp --dport 993 -j DNAT --to-destination 10.10.10.2:993
#-A PREROUTING -i enp3s0 -d 12.34.56.78 -p tcp --dport 110 -j DNAT --to-destination 10.10.10.2:110
-A PREROUTING -i enp3s0 -d 12.34.56.78 -p tcp --dport 995 -j DNAT --to-destination 10.10.10.2:995
#-A PREROUTING -i enp3s0 -d 12.34.56.78 -p tcp --dport 80 -j DNAT --to-destination 10.10.10.2:80
#-A PREROUTING -i enp3s0 -d 12.34.56.78 -p tcp --dport 443 -j DNAT --to-destination 10.10.10.2:443
now I can telnet to port 25 from with in my network and across my wireguard tunnel. but when I try to access it over the EIP of the Proxy host I get access denied now.
is there a firewall setting I need to change?
ref: Set Up Mail Proxy Server on Debian/Ubuntu/CentOS/RockyLinux