Skip to contentSkip to conversation

port forwarding AND local application consumption...

DISCUSSION Lucas Diaz 3 participants 4 messages Sep 27, 2006 – Sep 28, 2006

lore
Share & tools
lore

Lucas Diaz

author
#0 lore raw

I use kernel 2.4.x.
I need to do port forwarding to a remote host AND to pass these packets to a local application.

I used the DNAT feature in iptables and it does the port forwarding. But the issue is that these forwarded packets are unreachable to local application.

Any tips about proper iptables' rules to accomplish both?

Appreciate your help.
-D

#1 lore raw
Quoted 7 lines

I use kernel 2.4.x.
I need to do port forwarding to a remote host AND to pass these packets to a local application.

I used the DNAT feature in iptables and it does the port forwarding. But the issue is that these forwarded packets are unreachable to local application.

Of course, you just changed the IP address to something else than your own box. With DNAT, you explicitly 'give' up the connection for the local host.

Quoted 2 lines

Any tips about proper iptables' rules to accomplish both?

Apart from writing your own target extensions, I know of none. Might use ipt_ROUTE as a base, it contains a --tee option.

Jan Engelhardt

#2 lore raw

I use redhat kernel 2.4.x and looks like I need to rebuild the kernel if I want to use ROUTE target?

None of the iptables' rpms for fedora/redhat distro contain libipt_ROUTE.so.

What is best way to incorporate ROUTE target in
my situation?

-D

Quoted 19 lines · --- Jan Engelhardt
Quoted 2 lines

I use kernel 2.4.x.
I need to do port forwarding to a remote host AND

to

Quoted 3 lines

pass these packets to a local application.

I used the DNAT feature in iptables and it does

the

Quoted 1 line

port forwarding. But the issue is that these

forwarded

Quoted 1 line

packets are unreachable to local application.

Of course, you just changed the IP address to
something else than your
own box. With DNAT, you explicitly 'give' up the
connection for the
local host.

Quoted 2 lines

Any tips about proper iptables' rules to

Quoted 11 lines

accomplish both?

Apart from writing your own target extensions, I
know of none. Might use
ipt_ROUTE as a base, it contains a --tee option.

Jan Engelhardt

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#3 lore raw

Here is the related Bugzilla who direct the needed ones to netfilter!
Bugzilla Bug 145642: iptables ROUTE target does not work

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=145642#c3

-D

Quoted 48 lines · --- dave

I use redhat kernel 2.4.x and looks like I need to rebuild the kernel if I want to use ROUTE target?

None of the iptables' rpms for fedora/redhat distro contain libipt_ROUTE.so.

What is best way to incorporate ROUTE target in
my situation?

-D

Quoted 2 lines · --- Jan Engelhardt
Quoted 2 lines

I use kernel 2.4.x.
I need to do port forwarding to a remote host

AND

Quoted 17 lines

to

Quoted 3 lines

pass these packets to a local application.

I used the DNAT feature in iptables and it does

the

Quoted 1 line

port forwarding. But the issue is that these

forwarded

Quoted 1 line

packets are unreachable to local application.

Of course, you just changed the IP address to
something else than your
own box. With DNAT, you explicitly 'give' up the
connection for the
local host.

Quoted 2 lines

Any tips about proper iptables' rules to

Quoted 11 lines

accomplish both?

Apart from writing your own target extensions, I
know of none. Might use
ipt_ROUTE as a base, it contains a --tee option.

Jan Engelhardt

Quoted 7 lines

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com