Kocil
asked on
View current nat connections
Dear experts.
This is on a Linux firewall, with iptables masquerading.
What is the command to view all active NAT connections ?
Thanks.
This is on a Linux firewall, with iptables masquerading.
What is the command to view all active NAT connections ?
Thanks.
ASKER
I tried that
-----------------
root@firewall:~# netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:swat *:* LISTEN
tcp 0 0 *:time *:* LISTEN
tcp 0 0 *:finger *:* LISTEN
tcp 0 0 *:auth *:* LISTEN
tcp 0 0 *:ftp *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
udp 0 0 *:biff *:*
udp 0 0 *:ntalk *:*
udp 0 0 *:time *:*
raw 0 0 *:tcp *:* 7
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 3 [ ] DGRAM 152 /dev/log
unix 2 [ ] DGRAM 234
-----------------
But I think that is not what I want.
I want to see NAT connections that are going THROUGH this firewall.
[clients (intranet)]--------------> [firewall (NAT)]--------------->[ser vers(intra net)]
So I know which client is connected to which server.
Thanks.
-----------------
root@firewall:~# netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:swat *:* LISTEN
tcp 0 0 *:time *:* LISTEN
tcp 0 0 *:finger *:* LISTEN
tcp 0 0 *:auth *:* LISTEN
tcp 0 0 *:ftp *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
udp 0 0 *:biff *:*
udp 0 0 *:ntalk *:*
udp 0 0 *:time *:*
raw 0 0 *:tcp *:* 7
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 3 [ ] DGRAM 152 /dev/log
unix 2 [ ] DGRAM 234
-----------------
But I think that is not what I want.
I want to see NAT connections that are going THROUGH this firewall.
[clients (intranet)]-------------->
So I know which client is connected to which server.
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
depends how you define "connection"
most reliable/complete would be brabard's suggestion
/proc/net/ip_conntrack just gives "established" connections, probably not enough for you ..
most reliable/complete would be brabard's suggestion
/proc/net/ip_conntrack just gives "established" connections, probably not enough for you ..
ASKER
Ok.
Answer from brabard and khkremercomplement each other.
I need both of them.
Thanks all.
Answer from brabard and khkremercomplement each other.
I need both of them.
Thanks all.
use iptstate
Using "netstat -a" you can view active connections (not especially NAT).
But it may help.
Regards