Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My box is configured as a web server and that's it. Has someone hacked my box and installed another app that's serving some other purpose? What should I look for in netstat?
I ask also because right now I can't seem to ssh in or access webmin. The webserver is still running, though. Very suspicious.
Rebooted machine and now I can ssh in and webmin is running.
Checked access log for http. Looks like many of the IP addresses listed in the outbound connections are in here making requests for my web content. So perhaps this is what proxied connections do...
But here's something a little wierd from a plain netstat listing--
This is pretty weird. The reason I'm still curious is because not all the IP addresses in the outbound connection log are found in the http access log...
Me too. iv'e only recently installed it as well, just learning to secure my network. It is rather confusing not knowing what traffic you should be concerned about
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.