Linux Netfilter discussions
 help / color / mirror / Atom feed
* DNAT, Is it possible to find the original destination?
@ 2004-11-01 15:30 lumberjack
  2004-11-01 16:10 ` Jason Opperisano
  2004-11-08 23:09 ` Jason Lunz
  0 siblings, 2 replies; 6+ messages in thread
From: lumberjack @ 2004-11-01 15:30 UTC (permalink / raw)
  To: netfilter

iptables 1.2.9 on SuSE 9.1

I am using iptables redirection to send things inbound to port 80 to 
localhost:8080:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to 8080

Is there any way that my application can look in the table and see the real 
destination?  I've seen several things in patch-o-matic that do things with 
conntrack but there doesn't seem to be any command, /proc or /dev entry 
available to query "i have a connection from host foo, iptables, who was foo 
really wanting to speak too?".

Thanks,
Jason








^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: DNAT, Is it possible to find the original destination?
@ 2004-11-08 23:14 Daniel Chemko
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Chemko @ 2004-11-08 23:14 UTC (permalink / raw)
  To: Jason Lunz, netfilter

-m conntrack is the key here:

conntrack match v1.2.9 options:
 [!] --ctstate
[INVALID|ESTABLISHED|NEW|RELATED|UNTRACKED|SNAT|DNAT][,...]
                                State(s) to match
 [!] --ctproto  proto           Protocol to match; by number or name,
eg. `tcp'
     --ctorigsrc  [!] address[/mask]
                                Original source specification
     --ctorigdst  [!] address[/mask]
                                Original destination specification
     --ctreplsrc  [!] address[/mask]
                                Reply source specification
     --ctrepldst  [!] address[/mask]
                                Reply destination specification
 [!] --ctstatus [NONE|EXPECTED|SEEN_REPLY|ASSURED|CONFIRMED][,...]
                                Status(es) to match
 [!] --ctexpire time[:time]     Match remaining lifetime in seconds
against
                                value or range of values (inclusive)



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

end of thread, other threads:[~2004-11-08 23:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-01 15:30 DNAT, Is it possible to find the original destination? lumberjack
2004-11-01 16:10 ` Jason Opperisano
2004-11-02  6:11   ` Lumberjack
2004-11-02 13:39     ` Jason Opperisano
2004-11-08 23:09 ` Jason Lunz
  -- strict thread matches above, loose matches on Subject: below --
2004-11-08 23:14 Daniel Chemko

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