General discussion

Locked

iptables PREROUTING -j LOG

By stoker ·
Linux k 2.4.3, debian woody, iptables v1.1.2

A port mapped statically from ppp0 to a computer on the inside (eth0)

iptables -t nat -A PREROUTING -p tcp -i ppp0 --dport 1234 -j DNAT --to-destination 10.1.1.200:4321

This works great.. Now, how can I log these connections?
I would have thought that something like

iptables -A FORWARD -i ppp0 -p tcp --dport 1234 -j LOG

should have done it, but I guess PREROUTING grabs the packet before it
even enters the rest of the chain,I tried with INPUT and changed the fw-
script positions to see if putting it in a different location in the
chain would help, but nothing I tried seemed to work...

any clue? (-j LOG is not valid in the -t nat table)

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

iptables PREROUTING -j LOG

by Milstar In reply to iptables PREROUTING -j LO ...

nmap -sS -p 80 -O -v <host>

Collapse -

iptables PREROUTING -j LOG

by stoker In reply to iptables PREROUTING -j LO ...

That doesn't make much sense? Scanning a host for port 80 With SYN half-tcp, some os-guessing in verbose mode??

I need to log every single incoming and prerouted connection routed..

Collapse -

iptables PREROUTING -j LOG

by stoker In reply to iptables PREROUTING -j LO ...

Point value changed by question poster.

Collapse -

iptables PREROUTING -j LOG

by stoker In reply to iptables PREROUTING -j LO ...

Woody's new iptables package is now version 1.2.1, so I have upgraded this one, but the same still happens (or doesn't happen) :-) No-one has a clue about how to log PREROUTED connections with iptables?

Collapse -

iptables PREROUTING -j LOG

by stoker In reply to iptables PREROUTING -j LO ...

This question was closed by the author

Back to Security Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums