Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Iptables, traffic logging
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
Burnout
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jun 2004
Posts: 77

PostPosted: Thu Dec 09, 2004 8:51 am    Post subject: Iptables, traffic logging Reply with quote

Yow, I am using http://iptrafficvolume.sourceforge.net to log a servers traffic. The script logs traffic when the iptable begins with ACC-
BUT, when I trie to make an iptable rule for a counterstrike server, he cant log it.
I thought this lines where good to log his traffic:
Code:

iptables -N ACC-cs1
iptables -A ACC-cs1 -s ! xxx.xxx.xxx.xxx -d xxx.xxx.xxx.xxx --protocol tcp --destination-port 27015 -j ACCEPT
iptables -A ACC-cs1 -s xxx.xxx.xxx.xxx -d ! xxx.xxx.xxx.xxx --protocol tcp --destination-port 27015 -j ACCEPT
iptables -I INPUT -i eth0 -j ACC-cs1
iptables -I OUTPUT -o eth0 -j ACC-cs1

Where do I make a mistake? :confused:
Back to top
View user's profile Send private message
To
Veteran
Veteran


Joined: 12 Apr 2003
Posts: 1145
Location: Coimbra, Portugal

PostPosted: Thu Dec 09, 2004 9:55 am    Post subject: Reply with quote

Can you post exactly your rules without the xxxx that might explain a few things...

Also, if your local address is 10.10.10.1 and you don't want to count it:

iptables -A ACC-cs1 -s ! 10.10.10.1 -d xxx.xxx.xxx.xxx --protocol tcp --destination-port 27015 -j ACCEPT
iptables -A ACC-cs1 -s 10.10.10.1 -d ! xxx.xxx.xxx.xxx --protocol tcp --destination-port 27015 -j ACCEPT

I don't see the poing of the secound rule cause the first only adds that rule to the ACC table.


_________________

------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------
Back to top
View user's profile Send private message
Burnout
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jun 2004
Posts: 77

PostPosted: Thu Dec 09, 2004 10:03 am    Post subject: Reply with quote

I based me on the script examples.

The xxx.xxx.xxx.xxx is just an IP like 192.168.25.36 so that doesnt matter. Al the xxx.xxx.xxx.xxx are the same IP's.

The iptable rule doesn't work.

Do I make a mistake?
Back to top
View user's profile Send private message
Burnout
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jun 2004
Posts: 77

PostPosted: Thu Dec 09, 2004 4:11 pm    Post subject: Reply with quote

Hm, I think a gameserver uses the upd port more instead of the TCP port. Can somebody check my iptable rules plz.
Back to top
View user's profile Send private message
Burnout
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jun 2004
Posts: 77

PostPosted: Sat Dec 11, 2004 10:10 am    Post subject: Reply with quote

My problem is solved, thx for help! 8)
Back to top
View user's profile Send private message
gorm82
n00b
n00b


Joined: 21 Dec 2004
Posts: 2

PostPosted: Wed Dec 22, 2004 2:31 pm    Post subject: Reply with quote

And the solution ?
Back to top
View user's profile Send private message
Burnout
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jun 2004
Posts: 77

PostPosted: Wed Jan 19, 2005 7:45 am    Post subject: Reply with quote

This is the solution:
Code:

iptables -A ACC-cs1 -s ! 10.10.10.1 -d xxx.xxx.xxx.xxx --protocol udp --destination-port 27015 -j ACCEPT
iptables -A ACC-cs1 -s 10.10.10.1 -d ! xxx.xxx.xxx.xxx --protocol udp --destination-port 27015 -j ACCEPT

Just change the protocol in udp :)
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