LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-08-2004, 06:40 PM   #1
burn0ut
LQ Newbie
 
Registered: May 2004
Posts: 18

Rep: Reputation: 0
Question Iptables, traffic logging


Yow, I am using 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?
 
Old 12-09-2004, 01:54 AM   #2
burn0ut
LQ Newbie
 
Registered: May 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Does nobody know an answer to this problem?

Has somebody another solution to monitor gameservers network traffic?
 
Old 12-09-2004, 10:07 AM   #3
burn0ut
LQ Newbie
 
Registered: May 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Comon, you aren't going to say me that there is nobody who kan make iptables to log all traffic on port 27015, I just cant make it work.
 
Old 12-09-2004, 07:35 PM   #4
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
add this to your ACC-cs1 chain:
Code:
iptables -N ACC-cs1
iptables -A ACC-cs1 -p tcp --dport 27015 -j LOG --log-prefix="CS Traffic"
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
 
Old 12-11-2004, 04:08 AM   #5
burn0ut
LQ Newbie
 
Registered: May 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Thx!

After searching a long time, I found that I made a big mistake. Most gameservers use the UDP protocol to send traffic...
So I changed my rules a bit (also the destination port) and now they work! Thx
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logging All Incoming / Outbound Traffic technick Linux - Security 1 10-24-2005 02:32 PM
Basic traffic logging danimalz Debian 3 10-06-2005 06:58 PM
logging traffic of specific ports Bug Linux - Security 1 06-15-2004 08:26 AM
snort logging all outbound traffic as port-scan? Pcghost Linux - Security 3 04-20-2004 01:12 PM
Logging Traffic Equis Linux - Networking 0 03-09-2004 02:41 AM


All times are GMT -5. The time now is 04:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration