sri
06-24-2007, 12:15 PM
Hi,
Yesterday my Apache2 server started running slow.
Same today. So I did a netstat and got this:
==============================================================================
tcp 0 0 [MY SERVER]:57922 gp5s01.manabi.city.:www TIME_WAIT
tcp 0 0 [MY SERVER]:47364 carrera.websitewelc:www TIME_WAIT
tcp 0 0 [MY SERVER]:42965 apache2-twiddle.kea:www TIME_WAIT
tcp 0 0 [MY SERVER]:60629 eo-in-f147.google.c:www TIME_WAIT
tcp 0 0 [MY SERVER]:60663 eo-in-f147.google.c:www TIME_WAIT
tcp 0 0 [MY SERVER]:52982 62.129.142.107:www TIME_WAIT
tcp 0 0 [MY SERVER]:42619 niobe.sweb.ru:www TIME_WAIT
tcp 0 0 [MY SERVER]:43560 w8a.rzone.de:www TIME_WAIT
tcp 0 0 [MY SERVER]:43666 minsk.hostforweb.ne:www TIME_WAIT
==============================================================================
[I'm kinda clueless when it comes to networking, so please bear with me.]
I stopped Apache and all these things went away.
I don't understand how people from remote sites are able to access
my server at all the different ports.
Here is my iptables -L:
==============================================================================
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:7322
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:7373
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:smtp
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:www
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:https
ACCEPT tcp -- localhost localhost
ACCEPT icmp -- anywhere anywhere icmp echo-request
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT all -- anywhere [MY SERVER] state RELATED,ESTABLISHED
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
==============================================================================
I thought the last rule in INPUT was the problem:
ACCEPT all -- anywhere [MY SERVER] state RELATED,ESTABLISHED
(I made up the rules about 18 months ago when I first got the server and
haven't bothered about it since.)
So I deleted the rule and some strange things started happening:
running iptables -L -- it almost hung (took a long time to finish)
and so did netstat.
Whenever I startup apache all these foreign sites seem to be
accessing mine.
I google for keywords, but did come up with anything.
Can anyone help with what's going on?
Yesterday my Apache2 server started running slow.
Same today. So I did a netstat and got this:
==============================================================================
tcp 0 0 [MY SERVER]:57922 gp5s01.manabi.city.:www TIME_WAIT
tcp 0 0 [MY SERVER]:47364 carrera.websitewelc:www TIME_WAIT
tcp 0 0 [MY SERVER]:42965 apache2-twiddle.kea:www TIME_WAIT
tcp 0 0 [MY SERVER]:60629 eo-in-f147.google.c:www TIME_WAIT
tcp 0 0 [MY SERVER]:60663 eo-in-f147.google.c:www TIME_WAIT
tcp 0 0 [MY SERVER]:52982 62.129.142.107:www TIME_WAIT
tcp 0 0 [MY SERVER]:42619 niobe.sweb.ru:www TIME_WAIT
tcp 0 0 [MY SERVER]:43560 w8a.rzone.de:www TIME_WAIT
tcp 0 0 [MY SERVER]:43666 minsk.hostforweb.ne:www TIME_WAIT
==============================================================================
[I'm kinda clueless when it comes to networking, so please bear with me.]
I stopped Apache and all these things went away.
I don't understand how people from remote sites are able to access
my server at all the different ports.
Here is my iptables -L:
==============================================================================
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:7322
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:7373
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:smtp
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:www
ACCEPT tcp -- anywhere [MY SERVER] tcp dpt:https
ACCEPT tcp -- localhost localhost
ACCEPT icmp -- anywhere anywhere icmp echo-request
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT all -- anywhere [MY SERVER] state RELATED,ESTABLISHED
Chain FORWARD (policy DROP)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
==============================================================================
I thought the last rule in INPUT was the problem:
ACCEPT all -- anywhere [MY SERVER] state RELATED,ESTABLISHED
(I made up the rules about 18 months ago when I first got the server and
haven't bothered about it since.)
So I deleted the rule and some strange things started happening:
running iptables -L -- it almost hung (took a long time to finish)
and so did netstat.
Whenever I startup apache all these foreign sites seem to be
accessing mine.
I google for keywords, but did come up with anything.
Can anyone help with what's going on?