From: Kristofer <kristofer@cybernetik.net>
To: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
Cc: netfilter@vger.kernel.org
Subject: Re: Port forwarding (non-NAT)
Date: Tue, 19 Feb 2008 11:01:00 -0600 (CST) [thread overview]
Message-ID: <6626020.13031203440460640.JavaMail.root@lodge.cybernetik.net> (raw)
In-Reply-To: <47BAB430.9040104@plouf.fr.eu.org>
> Huh ? What is that SMTP software which requires tu run one separate
> daemon for each listening port ? If it can use inetd, you can have it
> listening on multiple ports even without a single idle daemon running
> (except inetd itself of course).
I mis-spoke. What I am using requires me to manually edit configuration files after every single upgrade (annoying), so I'd rather adjust the settings outside of the software (such as iptables) so I can simply have it remain listening on port 25 only and I do not have to edit configuration files to tell it to also listen on port 587.
> Port forwarding is a form of destination NAT. It can also be done with a
> TCP relay such as 6tunnel, but the final destination sees only the relay
> address, not the original source address. Not very convenient for
> logging or access control.
I assumed that may be the case. I'm coming out of a world of IPFW and trying to get a complete grasp on iptables. It's getting more clear each day. :-)
> > if iptables on the same computer as the smtp server:
> >
> > iptables -t nat -A PREROUTING -p tcp --dport 587 -m state --state NEW -d
> > $IP_OF_MAIL_SERVER -j REDIRECT --to-ports 25
> >
> > else:
> >
> > iptables -t nat -A PREROUTING -p tcp --dport 587 -m state --state NEW -d
> > $IP_OF_MAIL_SERVER -j DNAT --to $IP_OF_MAIL_SERVER:25
>
> Note that the second rule also works on the server itself.
I went with the first rule, and it is working thus far.
Thanks!
Kristofer
prev parent reply other threads:[~2008-02-19 17:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1664820.9541203376664790.JavaMail.SYSTEM@tater>
2008-02-18 23:18 ` Port forwarding (non-NAT) Kristofer
2008-02-19 0:26 ` Jon Wilson
2008-02-19 10:49 ` Pascal Hambourg
2008-02-19 17:01 ` Kristofer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6626020.13031203440460640.JavaMail.root@lodge.cybernetik.net \
--to=kristofer@cybernetik.net \
--cc=netfilter@vger.kernel.org \
--cc=pascal.mail@plouf.fr.eu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.