View previous topic :: View next topic |
Author |
Message |
Burnout Tux's lil' helper
Joined: 24 Jun 2004 Posts: 77
|
Posted: Thu Dec 09, 2004 8:51 am Post subject: Iptables, traffic logging |
|
|
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 |
|
|
To Veteran
Joined: 12 Apr 2003 Posts: 1145 Location: Coimbra, Portugal
|
Posted: Thu Dec 09, 2004 9:55 am Post subject: |
|
|
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.
Tó _________________
------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------ |
|
Back to top |
|
|
Burnout Tux's lil' helper
Joined: 24 Jun 2004 Posts: 77
|
Posted: Thu Dec 09, 2004 10:03 am Post subject: |
|
|
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 |
|
|
Burnout Tux's lil' helper
Joined: 24 Jun 2004 Posts: 77
|
Posted: Thu Dec 09, 2004 4:11 pm Post subject: |
|
|
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 |
|
|
Burnout Tux's lil' helper
Joined: 24 Jun 2004 Posts: 77
|
Posted: Sat Dec 11, 2004 10:10 am Post subject: |
|
|
My problem is solved, thx for help! |
|
Back to top |
|
|
gorm82 n00b
Joined: 21 Dec 2004 Posts: 2
|
Posted: Wed Dec 22, 2004 2:31 pm Post subject: |
|
|
And the solution ? |
|
Back to top |
|
|
Burnout Tux's lil' helper
Joined: 24 Jun 2004 Posts: 77
|
Posted: Wed Jan 19, 2005 7:45 am Post subject: |
|
|
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 |
|
|
|