(E-Mail Removed) wrote:
> Hi All,
>
> i would like to use my private linux box as a SMTP proxy server. What i
> would like to do si the following:
>
>
> | Any mail client | --> | my server:10025 | --> | external server:25 |
>
>
> I would like to send emails to an external SMTP server but configure
> the email client to use the IP and a specific port on my own server.
> This should be possible not only from internal client but from
> everywhere.
>
> Is that also possible with iptables or do i need any other piece of
> software ?
>
> Any help is highly appreciated!
>
> Thanks, Martin
I think this should do it [disclaimer: not tested!!]. I do something
rather simular for news servers, but without the port mapping.
iptables -A PREROUTING -p tcp -m tcp --dport 10025 -j DNAT \
--to-destination $EXTERNAL_SERVERS_IP:25
iptables -A POSTROUTING -d $EXTERNAL_SERVERS_IP -p tcp -m tcp \
--dport 25 -j SNAT --to-source $THIS_SERVERS_IP
Chris
--
Get control of Peer-to-peer traffic with linux firewalls.
http://www.lowth.com/rope
Minimal "false positive" matching of eDonkey, Bittorrent,
Gnutella etc.