Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Snort is a great tool to use. I highly recommend setting it up with mysql and using acid as an a php front end. You will need to spend a some time configuring the rules to meet your needs but it can be very useful.
The other thing you should really do is setup a firewall with iptables. It is a little confusing when you first do it but after a while it becomes second nature. This way you can just close all your ports except the ones you know you need.
Ok, so last night I installed Snort with ACID and mysql. Very useful. I immediately detected attempts at exploiting my phpnuke webapp that I had fortunately protected against using mod_rewrite directives.
But my router's outbound connection log is still filled with this stuff hitting other IP's in high port ranges. Snort has no mention of this.
The IP on the left is my own. The IP in the middle is the destination. The 5-digit number on the far right is the destination port number. It looks like my computer is port scanning. No alerts from snort, though.
It is difficult to tell what your outbound connections are. But the best way to test would be to shutdown your web server for the night and take a look at your log. If you are still getting the traffic take a look at the other processes running on your box. ps -aef there must be something doing it.
most people just put their iptables as a startup script. it is best habit to flush everything at the top of your script and to log everything. There are tons of examples on line, it is easiest- to customize someone elses script when you are just getting started.
You mentioned that you are running a web server? So you have incoming port connections from a misc higher port number to your box, port 80. They you have outbound connections to that higher port number from your port 80. So:
Client port 13000 > You port 80
You port 80 > client 13000
So you should expect to see outbound connections from your port 80 to high port numbers. Maybe I'm missing something but this seems reasonable. Also wouldn't a trojan of some kind be contacting one port and not a bunch of random ones?
I was thinking that, too. If it were a trojan, why would it be skipping around to all those different port numbers without any rhyme or reason. But then I thought maybe it was a clever probing algorithm that was avoiding detection by the targets by only hitting them randomly.
To be sure, I'll shut off httpd for a couple hours and see what is logged.
Unfortunatley my motherboard died on my linux box so i have to run windoze at the moment till i get my new, but i was told you can add it to the /etc/rc.d/init.d/iptables script. I'm not sure where to add it to the script i.e top.middle or bottom, since there is already a fair amount stuff in there.