Skip to main content

Thread: Forwarding traffic on a specific port (SMTP) through an SSH tunnel using iptables


i asked few days in networking section of forums, realized more apt place find answer. alright, question of why want going first come up, i'll answer first. casual ubuntu user , few months started hosting own email server personal , home use by. comcast, being wonderful isp are, decided block of incoming , outgoing smtp traffic on port 25 without kind of notification whatsoever! hadn't had issue them past 6 months, spent 3 days troubleshooting configs, routing, port forwards, etc. , came nothing. when decided call them, bounced around "tech support" department. of course nobody knew , told me use "@comcast.net" address or talk service provider. @ point, said screw , got myself vps mail relay. reason i'm here on forums that, while able route mail traffic remote ports on vps (back locally hosted mail server through ssh forwards) have not been able find way tell postfix either send through vps (preferred) or send using different port. i've literally spent hours on google one, have not been able come decisive answer. have found best solution use iptables forward traffic vps, act "gateway" (masquerade) outside world. other solutions involve smarthosts (i don't want set 1 of these because have no clue how , don't want spend time making whole mail server route outbound traffic) , proxies, seem able relay conversations between mail servers (but one's i've seen seem extentions of postfix processing mail , not sending it). if able come real solution please post. appreciate if people refrain posting things telling me vps solution overly-complex or scrap , try else well.

look @ description of "relayhost" parameter here. you'll need run postfix on remote server well.

have asked comcast using server mail relay? believe offer service, though don't know whether extends residential users. i'd bet servers in general forbidden terms of service. residential contracts ban servers.

might want consider using openvpn set point-to-point tunnel between 2 machines. it's pretty easy if use static-key method. if take method, can set iptables forwarding rules route traffic intended remote port 25 on tunnel vps.

i'd use relayhost, though. it's easier set up.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms Forwarding traffic on a specific port (SMTP) through an SSH tunnel using iptables


Ubuntu

Comments

Popular posts from this blog

Some mp4 files not displaying correctly (CS6)

Thread: Samba is not authenticating with LDAP