Hi, I'm very new to linux but have been trying some advanced configurations. Sorry if this is a long post but I've tried a lot of things already and I want to give proper context.
I've set up a ubuntu 12.04 server as a router with port forwarding (issue is with smtp). I've poured over all the information I could Google on it and I'm 90% there, just have a few weird issues. My guess is I don't have UFW configured correctly either on the router or on the mail server.
I'm running an ubuntu 12.04.4 LTS VM on Hyper-V (I know, Virtualbox or VMware are far better but it is what it is). eth0 is configured with a public IP, eth1 is a private LAN address 10.0.0.1 in my DMZ. I also have another ubuntu server as an internal firewall separating my DMZ from my internal network, it has an interface configured with DMZ IP 10.0.0.254. My destination http/https servers are currently on my internal network, i haven't moved them to the DMZ yet so port forwarding passes through the internal fw. The smtp server is on the DMZ subnet with IP 10.0.0.50 (another ubuntu server with scrollout f1 mail gw which uses postfix).
I've got NAT working fine and set up port forwarding for 80, 443, 25 and a custom port 1616. The weirdness is that 80, 443 and 1616 forward just fine but 25 isn't forwarding. I verified with my ISP they are not blocking it and it was working prior to Jul 3 on a previous server (hard drive filled up and server crashed, I tried to expand drive but hosed it instead, so I had to rebuild).
All of the port forwarding rules are configured exactly the same in before.rules so I doubt thats the issue since all work except the one smtp rule. I have UFW on the router configured with the following rules:
Code:
To Action From
-- ------ ----
10.0.0.50 25 ALLOW <public ip>
10.0.0.254 80 ALLOW <public ip>
10.0.0.254 443 ALLOW <public ip>
10.0.0.254 1616 ALLOW <public ip>
10.0.0.0/24 DENY <public ip>
I have UFW configured on the smtp server with the following rules:
Code:
To Action From
-- ------ ----
22 ALLOW Anywhere
25 ALLOW Anywhere
80 ALLOW Anywhere
443 ALLOW Anywhere
I also enabled ufw logging on both servers but it doesn't show any activity (block or allow).
Last thing is when I try to telnet to the public IP from the public internet, it times out like nothing is listening on 25. I can telnet from the 10.0.0.1 and 10.0.0.254 routers to the mail gw with no problem. I can telnet from my internal Exchange server to the mail gw with no problem. This points me to the router passing traffic from the public IP to the DMZ IP and forwarding it to the mail gw.
I'm happy to post additional configs as needed. Any help or suggestions of where the look next is greatly appreciated!
Note: The IPs have been changed to protect the innocent.