RE: IPTables Logging Problem.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

> I am having a problem reg IPtables Logging. Suppose I want to LOG all
> the packets for a particular session. How I can do that? 
> (Here, Session
> say telnet is established b/w 2 hosts and I want to Log all 
> the packets
> on host A (say) i.e. the outgoing and incoming packets). 
> I know abt the commans :-
> 
> Iptables -A INPUT -s HOSTA -d HOSTB -p tcp -sport 21 -j LOG 

What kind of rule is that? does your client build up a connection from low
ports to low ports? My computer doesn't do that. But to answer your
question:

iptables -A OUTPUT -s HOSTB -d HOSTA -p 6 --dport 21 -j LOG

will solve your problem.

> But it logs only packets from HostA to HostB 

of course

> while I want the reverse
> also. 

put in that second rule.

Philipp


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux