Linux Netfilter discussions
 help / color / mirror / Atom feed
* how do I port forward through loopback?
@ 2004-05-18 13:59 Mark
  2004-05-19  5:31 ` Ray Leach
  2004-05-19  5:31 ` Ray Leach
  0 siblings, 2 replies; 3+ messages in thread
From: Mark @ 2004-05-18 13:59 UTC (permalink / raw)
  To: netfilter

Hello,
I need to port forward all traffic locally going to port 80 to port 
8040.  For the external interface eth0 this works, I thought it would 
work for the internal/loopback as well. Nothing else is turned on
, all other settings are open.

/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT 
--to-port 8040

this doesn't work for the internal network, 127.0.0.1 lo, not sure why
System info: Redhat7.3, 2.4.20 kernel, iptables-1.2.8-8.72.3
Thanks



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how do I port forward through loopback?
  2004-05-18 13:59 how do I port forward through loopback? Mark
@ 2004-05-19  5:31 ` Ray Leach
  2004-05-19  5:31 ` Ray Leach
  1 sibling, 0 replies; 3+ messages in thread
From: Ray Leach @ 2004-05-19  5:31 UTC (permalink / raw)
  To: Netfilter Mailing List

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

On Tue, 2004-05-18 at 15:59, Mark wrote:
> Hello,
> I need to port forward all traffic locally going to port 80 to port 
> 8040.  For the external interface eth0 this works, I thought it would 
> work for the internal/loopback as well. Nothing else is turned on
> , all other settings are open.
> 
> /sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT 
> --to-port 8040
> 
> this doesn't work for the internal network, 127.0.0.1 lo, not sure why
> System info: Redhat7.3, 2.4.20 kernel, iptables-1.2.8-8.72.3
> Thanks

To get nat to work on the local interface you have to compile the kernel
with local nat support. The catch is that normal nat stops working.

-- 
--
Raymond Leach <raymondl@knowledgefactory.co.za>
Network Support Specialist
http://www.knowledgefactory.co.za
"lynx -source http://www.rchq.co.za/raymondl.asc | gpg --import"
Key fingerprint = 7209 A695 9EE0 E971 A9AD  00EE 8757 EE47 F06F FB28
--

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how do I port forward through loopback?
  2004-05-18 13:59 how do I port forward through loopback? Mark
  2004-05-19  5:31 ` Ray Leach
@ 2004-05-19  5:31 ` Ray Leach
  1 sibling, 0 replies; 3+ messages in thread
From: Ray Leach @ 2004-05-19  5:31 UTC (permalink / raw)
  To: Netfilter Mailing List

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

On Tue, 2004-05-18 at 15:59, Mark wrote:
> Hello,
> I need to port forward all traffic locally going to port 80 to port 
> 8040.  For the external interface eth0 this works, I thought it would 
> work for the internal/loopback as well. Nothing else is turned on
> , all other settings are open.
> 
> /sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT 
> --to-port 8040
> 
> this doesn't work for the internal network, 127.0.0.1 lo, not sure why
> System info: Redhat7.3, 2.4.20 kernel, iptables-1.2.8-8.72.3
> Thanks

To get nat to work on the local interface you have to compile the kernel
with local nat support. The catch is that normal nat stops working.

-- 
--
Raymond Leach <raymondl@knowledgefactory.co.za>
Network Support Specialist
http://www.knowledgefactory.co.za
"lynx -source http://www.rchq.co.za/raymondl.asc | gpg --import"
Key fingerprint = 7209 A695 9EE0 E971 A9AD  00EE 8757 EE47 F06F FB28
--

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-19  5:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-18 13:59 how do I port forward through loopback? Mark
2004-05-19  5:31 ` Ray Leach
2004-05-19  5:31 ` Ray Leach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox