* redirecting packets from one destination to a local host
@ 2004-06-30 4:51 Milan Durovic
0 siblings, 0 replies; only message in thread
From: Milan Durovic @ 2004-06-30 4:51 UTC (permalink / raw)
To: netfilter
Hi,
I have iptables 1.2.2 (debian woody), kernel 2.4.25. In my network
setup, I have an ADSL modem/router that does NAT and redirects all the
smtp, http, etc requests to a Linux machine on inside. This works fine.
The problem: when I recently installed mailman, its scripts try to
access smtp server via address that maps into the public IP address of
the ADSL modem/router. So, requests never reach the mail server, which
is running on the Linux machine itself.
I want to setup iptables so that any requests originating from the Linux
server and destined to the public IP address of the ADSL modem/router
are redirected to the Linux server itself.
I tried:
iptables -t nat -A OUTPUT -d public_ip -j REDIRECT
(rule was accepted).
I also tried:
iptables -t nat -A OUTPUT -d public_ip -p tcp -j DNAT --to lin_srv_ip
but the command failed ("iptables: Invalid argument").
When I try "telnet public_ip smtp" I get 'connection refused' and when I
then go with "iptables -t nat -v -L" it shows that no packet matched the
REDIRECT rule.
Is there a simple way of achieving this? REDIRECT seems to be the right
sort of action that I want, but it doesn't seem to work.
Regards,
Milan
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-06-30 4:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-30 4:51 redirecting packets from one destination to a local host Milan Durovic
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.