0

My ISP block pop3 port 110 & smtp port 25. I have own VPS mail server and i would like to use pop3 email. How can i listen pop3 on both 443 & 110. I have enable the forwarding in /proc/sys/net/ipv4/ip_forward file. Type this command in shell >> iptables -A FORWARD -p tcp --sport 443 -i eth0 -o eth0 --dport 110 -j ACCEPT

Here is result in iptables

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:https dpt:pop3

When i access pop3 mail from Outlook got an error. Please check screenshot:

4 Answers 4

2

Tell your ISP to unblock the default ports ports for you. If they won't, get a new ISP.

2
  • if need to get new ISP, won't post here
    – LoRdiE
    Jan 7, 2010 at 5:45
  • Just because you don't like the answer, doesn't mean it isn't the correct one.
    – womble
    Jan 7, 2010 at 6:30
1

If I understand correctly, you wish to redirect traffic that is coming for the port 443 of your email server to be redirected to port 110 instead.

If that's the case, doing so with iptables rules is a bit more complex than what you've just described. I would suggest to modify the configuration of your mail server for it to listen to another port than 110. Most mail server will allow you to change that. Without knowing what mail system you use it's difficult to tell you where to change the configuration however.

3
  • Thanks for reply. I'm using CentOS 5.4 with cPanel. Mail server is Dovecat/Exim/cPPOP
    – LoRdiE
    Jan 7, 2010 at 5:56
  • +1: Much easier to change the port in the mail program than to do ass-around-your-elbow with iptables. Jan 7, 2010 at 14:18
  • How do i change port? Need to configure the firewall to allow traffic on port 443? How can i check which port is use by which service?
    – LoRdiE
    Jan 8, 2010 at 2:58
1

Why don't you just run POP3 on a different port? Configure a suitable port on each end and do away with all that complication.

1

I agree w/ the other posters re: just chaging your POP3 daemon to listen on another port.

If you really want to do this with iptables, though, the iptables REDIRECT target is what you're looking for:

iptables -t nat -A PREROUTING -d x.x.x.x -p tcp --dport 443 -j REDIRECT --to-port 110

Substitute the IP address of the machine in for x.x.x.x and incoming traffic to TCP port 443 will be redirected to TCP port 110.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .