hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : A lot of connections from 127.0.0.1
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

A lot of connections from 127.0.0.1

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-06-2010, 07:53 AM
myk8022 myk8022 is offline
Junior Guru Wannabe
 
Join Date: Jul 2009
Location: In the sky
Posts: 40

A lot of connections from 127.0.0.1


Hi,

My server became really slow today and the loads were quite high.

So I checked what IPs were connecting to the server..
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

And I saw something like:
130 127.0.0.1

Why were there so many connections from localhost? Is it some kind of synflood/DOS attack originating from the server? It's happened a few times recently now.. any advice would be appreciated, thanks.

Reply With Quote


Sponsored Links
  #2  
Old 04-06-2010, 08:15 AM
larwilliams larwilliams is offline
Premium Member
 
Join Date: Jan 2008
Location: St. John's, NL
Posts: 2,029
It could be a poorly written script that is using http to access data or other pages.

__________________
Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
LCWSoft - Canadian web hosting since 2007
Servers based in the US and Canada (Uptime Report)

Reply With Quote
  #3  
Old 04-06-2010, 08:56 AM
LVPSHosting LVPSHosting is offline
Web Hosting Master
 
Join Date: Sep 2009
Posts: 1,416
Can you see and tell us with "netstat -anlp" which service/program these connections belong too?

__________________
LVPSHosting.com|Virtual Private Servers|Dedicated Servers|
Managed Hosting Solution|24/7/365 Support
Datacentar and servers location: Holland, Europe

Reply With Quote
Sponsored Links
  #4  
Old 04-06-2010, 09:17 AM
ksv2nash ksv2nash is offline
Web Hosting Guru
 
Join Date: Nov 2009
Location: Nasik,India
Posts: 252
Hello,

You can you this scripts to stop this
[root@xxxx~]# cat undos.sh
#!/bin/bash
#date = `date`
#echo "undos ran on $date" >> /var/log/undos.log
netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1|awk '$1>30{print $2;}' > /root/ips.txt
for ip in `awk '{print;}' < /root/ips.txt`
do
apf -d $ip
done
rm -f /root/ips.txt
killall -9 httpd
killall -9 httpd
/etc/init.d/httpd startssl
[root@xxxx~]#

__________________
|Omiz Solutions |
24/7 Remote Technical Support & Server Management.

Reply With Quote
  #5  
Old 04-09-2010, 07:40 AM
MrSaints MrSaints is offline
WHT Addict
 
Join Date: Aug 2009
Posts: 167
Are you using cPanel?
If so, that's quite expected since those requests coming from 127.0.0.1 could possibly be coming from the chksrvd daemon to verify that Apache is online. They don't tend to consume much CPU time though
If possible, get a screenshot of your:
top -c

So we can figure out where exactly the load is coming from.

__________________
Ian Lai - www.fyianlai.com
Web Design / Development
Systems Administration

Reply With Quote
  #6  
Old 04-10-2010, 07:31 AM
Sileep Kumar M S Sileep Kumar M S is offline
WHT Addict
 
Join Date: Mar 2010
Posts: 128
Quote:
Originally Posted by ksv2nash View Post
Hello,

You can you this scripts to stop this
[root@xxxx~]# cat undos.sh
#!/bin/bash
#date = `date`
#echo "undos ran on $date" >> /var/log/undos.log
netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1|awk '$1>30{print $2;}' > /root/ips.txt
for ip in `awk '{print;}' < /root/ips.txt`
do
apf -d $ip
done
rm -f /root/ips.txt
killall -9 httpd
killall -9 httpd
/etc/init.d/httpd startssl
[root@xxxx~]#
If you are using apf, above script will block all IPs having 30+ http connection!

For ksv2nash: If you paste a script please explain the working also.

__________________
Regards,
Sileep Kumar M S


Reply With Quote
  #7  
Old 05-01-2010, 02:41 AM
mabnux mabnux is offline
Newbie
 
Join Date: Mar 2010
Posts: 13
Hi,

what you can edit( $1>30) to the number of connections that you wish to restrict connecting to server

HAND

Reply With Quote
  #8  
Old 03-10-2013, 11:37 PM
LearnNginx LearnNginx is offline
Newbie
 
Join Date: Mar 2013
Posts: 21
Exclamation hi

I'm also getting this error, any fixes? I am getting a lot of connections from 127.0.0.1

Reply With Quote
  #9  
Old 03-10-2013, 11:50 PM
dale dale is offline
Arbeitsloser
 
Join Date: Mar 2005
Location: Cardboard box
Posts: 943
If you see a lot of connection from 127.0.0.1, like:
Quote:
127.0.0.1 - - [26/Feb/2013:16:00:58 +0800] "OPTIONS * HTTP/1.0" 200 -
127.0.0.1 - - [26/Feb/2013:16:00:59 +0800] "OPTIONS * HTTP/1.0" 200 -
127.0.0.1 - - [26/Feb/2013:16:01:00 +0800] "OPTIONS * HTTP/1.0" 200 -
This is probably Apache (assuming this is what you use) polling child processes. This is perfectly harmless. But yes, it's annoying.

To get rid of it, add a SetEnvIf in your httpd.conf, e.g.:
Quote:
SetEnvIf Remote_Addr "127\.0\.0\.1" loopback
CustomLog logs/access_log combined env=!loopback
If you use a control panel like cPanel, you might need to go through extra steps to make sure the configuration sticks. In the case of cPanel, you'll need to run the distiller, i.e.: apache_conf_distiller --update

Be sure to cat access_log|tail -n10 (or something like that) to make sure that the SetEnvIf is working. Hope this helps.

__________________
distrACT -- an open community

Reply With Quote
  #10  
Old 03-11-2013, 03:57 AM
LearnNginx LearnNginx is offline
Newbie
 
Join Date: Mar 2013
Posts: 21
I'm using NGINX and it's not a harmless attack, it's a port 80 flood, I just don't know how to prevent or even troubleshoot it.

Reply With Quote
  #11  
Old 03-11-2013, 04:03 AM
dale dale is offline
Arbeitsloser
 
Join Date: Mar 2005
Location: Cardboard box
Posts: 943
What do you get with this:
Quote:
netstat -n -p|grep SYN_REC | wc -l

__________________
distrACT -- an open community

Reply With Quote
  #12  
Old 03-11-2013, 04:43 AM
LearnNginx LearnNginx is offline
Newbie
 
Join Date: Mar 2013
Posts: 21
Quote:
Originally Posted by dale View Post
What do you get with this:
It returned as '0'.
http://prntscr.com/vvakp

Reply With Quote
  #13  
Old 03-11-2013, 05:07 AM
LearnNginx LearnNginx is offline
Newbie
 
Join Date: Mar 2013
Posts: 21
Just checked again and posted different values multiple times; http://prntscr.com/vvbxw

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
too many connections fron 127.0.0.1 irantrack Hosting Security and Technology 12 03-15-2010 07:45 AM
Deny all connections to certain port, except for 127.0.0.1 sh4ka Hosting Security and Technology 6 06-04-2009 06:13 PM
127.0.0.1 accessing apache a lot Klentelaris Hosting Security and Technology 3 11-26-2008 03:09 AM
MDaemon: How to accept only 127.0.0.1 SMTP connections? astraeuz Hosting Security and Technology 4 02-14-2008 02:44 AM
FTP connections from 127.0.0.1 ???? Help WWWhost Hosting Security and Technology 8 01-12-2005 06:45 PM

Related posts from TheWhir.com
Title Type Date Posted
Cologix Expands Standard Connections Product to All Carrier Hotel Data Centers Web Hosting News 2013-01-15 11:25:06
Hurricane Electric Expands European Network with Milano, Vienna Points-of-Presence Web Hosting News 2012-11-30 14:59:46
DDoS Protection firm Black Lotus Reveals Patent-Pending Human Behavior Analysis Technology Web Hosting News 2012-09-10 08:44:01
Nirvanix Provides Cloud Storage to Web Hosts Via Equinix Data Centers Web Hosting News 2012-03-26 12:29:34
Hackers Issue New DDoS Attack Tool to Expose SSL Flaw Web Hosting News 2011-10-25 16:34:00


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?