Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Use of netstat on a gateway
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
MrPyro
Tux's lil' helper
Tux's lil' helper


Joined: 14 Aug 2003
Posts: 121
Location: Sheffield, England

PostPosted: Mon Aug 18, 2003 1:13 pm    Post subject: Use of netstat on a gateway Reply with quote

I have a network set up, where all the computers (running a mix of Windows 98/2000 and Linux) route through a gateway runnning Gentoo. The Gentoo server is running an iptables NAT firewall to masquerade all the addresses to the outside world.

Does anybody know of a way to use netstat or another net tracking tool to see what connections are being routed through the gateway? Netstat with no options seems to only show the conections the gateway itself is making, not what the workstations in the lab are connecting to. I tried the -M option (which the man page says "displays a list of masqueraded connections"), but it just prints an error saying
Code:

netstat: no support for 'ip_masquerade' on this system

Given that the NAT firewall is running perfectly and has been for several months, I assume all appropriate kernel options are activated, so I don't know why it tells me I have no support.

If somebody knows of a better netstat option to use (I read the man page but none jumped out at me), or can suggest a better tool (with no GUI, as I'm running an X-less server), I would be very grateful.
_________________
Back off man, I'm a computer scientist
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Mon Aug 18, 2003 3:04 pm    Post subject: Reply with quote

What about using /proc/net/ip_conntrack? You'll probably have to write a basic script to make it pretty. :)
Back to top
View user's profile Send private message
MrPyro
Tux's lil' helper
Tux's lil' helper


Joined: 14 Aug 2003
Posts: 121
Location: Sheffield, England

PostPosted: Mon Aug 18, 2003 3:15 pm    Post subject: Reply with quote

Good lord, that is an ugly file, isn't it? :)

Looks like its got all the info I need though: just need to decrypt it and make it look nice.

Cheers for the pointer, devon.
_________________
Back off man, I'm a computer scientist
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum