HOWTO: using alternative port for SMTP and PLESK

Discussion in 'Parallels Plesk Panel for Linux - 8.x and Older' started by NightMan, Jun 8, 2007.

  1. NightMan

    NightMan New Member

    Messages:
    754
    Your customer may complain sometime they cannot use their SMTP server to sending mails out. Most probably the ISP started blocking 3rd party smtp servers.
    In this case you can provide an alternative port for your customers to send mails out.
    Or
    Some customers having problem accessing your PLESK control panel using from their work but it working fine from their home. This is a case network admin at work is blocking the port 8443.

    Here is a simple solution.
    You can use your firwall to route all traffic coming to one port to another, no need to change or configure anything in the PLESK. no need to configure things again and again after every PLESK upgrade.

    Just preroute the ports.

    e.g: routing smtp port 25 to 3525
    iptables -t nat -I PREROUTING -p tcp --dport 3625 -j REDIRECT --to-port 25

    e.g: routing PSA access port 8443 to 3636
    iptables -t nat -I PREROUTING -p tcp --dport 3636 -j REDIRECT --to-port 8443

    if you are using APF firewall then just add following line to the preroute.rules file.
    $IPT -t nat -I PREROUTING -p tcp --dport 3625 -j REDIRECT --to-port 25
    $IPT -t nat -I PREROUTING -p tcp --dport 3636 -j REDIRECT --to-port 8443


    Use it, test it. And I should not be held responsible for any misconfiguration of your firewall settings. :)
  2. atomicturtle

    atomicturtle Product Expert

    Messages:
    3,768
    Or just use port 465 :p
  3. NightMan

    NightMan New Member

    Messages:
    754
    that will prompt for a ssl certificate error(if you dont have installed a vaild one.) am I right?
  4. nerbonne

    nerbonne New Member

    Messages:
    27
    That worked great. Thanks.
  5. nerbonne

    nerbonne New Member

    Messages:
    27
    Just one question:

    Will that command make the iptables rule permanent, or do I need to do something else?

    I remember on my old box when I would block IP's with iptables, that the rules would be gone when I rebooted.

    Please let me know. Thanks!
  6. NightMan

    NightMan New Member

    Messages:
    754
    you have to load your iptable rules after the reboot.

    To autostart apf on reboot, run this:

    chkconfig --level 2345 apf on

    To remove it from autostart, run this:

    chkconfig --del apf

    some usefull information here.
    http://gentoo-wiki.com/HOWTO_Iptables_for_newbies
  7. madsere

    madsere New Member

    Messages:
    352
  8. NightMan

    NightMan New Member

    Messages:
    754
    nothing wrong with this method. but when you upgrade the PLESK, then you have to make the changes again.

    firewall method is simple and not affected by the PLESK upgrade. the same way you can give access to the PSA by another port than 8443.

Share This Page