Page 3 of 3 FirstFirst 123
Results 31 to 45 of 153

Thread: How-to Lighttpd, PHP, MySQL and Eaccelerator

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Location
    Ukraine, Kiev
    Posts
    25
    I observe similar queries in logs of my web-server too (I have lighttpd+mysql running small forum on top of RT-N16).

    Someone is scanning internet looking for admin pages of typical services and other common vulnerabilities exposed to internet. That's pretty common and there's no good way to block them (at least I don't know any).

    I wouldn't worry about them unless you found something relevant to your web site (like multiple strange requests to some script).

  2. #2
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Its hard to block scanners like that trough iptables, you would need different software for that.

    What you can do is chroot your website directory, you have several how-to's on the internet for that sort of stuff.
    Even if they get in, they won't be able to access the router completely, just the webpages.

    I do agree that you have to watch out these days, so many pages are being injected with weird stuff... damn hackers with their botnets

  3. #3
    Quote Originally Posted by reiten View Post
    Someone is scanning internet looking for admin pages of typical services and other common vulnerabilities exposed to internet. That's pretty common and there's no good way to block them (at least I don't know any).
    Yes. But if someone scans my router several times, i block them that way:
    Code:
    $ cat /tmp/local/sbin/post-firewall
    #!/bin/sh
    ...
    for banned_ip in `cat /tmp/local/sbin/banned_ips.txt`;
    do
        iptables -I INPUT -s $banned_ip -j DROP
    done
    Code:
    $ cat /tmp/local/sbin/banned_ips.txt
    109.230.220.35
    109.230.251.94
    109.236.81.56
    111.228.1.5
    116.255.163.100
    118.129.154.165
    119.188.7.161
    ...
    Its ugly way, i know, but some scanners are really annoying.

  4. #4
    Will that blocking thing slow down webserver? Becaus I think they use everytime different IP, and that banned_ips.txt file will get long after some time.

    And what is a good way to follow access and error.log files? I made them to rotate like system log, and sended to my email as text. But email breaks those access log lines so that's hard to follow it.

  5. #5
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by jeremees View Post
    Will that blocking thing slow down webserver? Becaus I think they use everytime different IP, and that banned_ips.txt file will get long after some time.

    And what is a good way to follow access and error.log files? I made them to rotate like system log, and sended to my email as text. But email breaks those access log lines so that's hard to follow it.
    iptables will block anything from that ip... it's on a low level, but yes it will slow down your system slightly. Probably it won't be noticable tho.

    I'm actually working on getting snort installed and working: http://www.snort.org/
    not sure how fast it is so far... but I have the idea that it's too heavy
    snort is able to detect illegal attempts and able to block it

  6. #6
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    Quote Originally Posted by jeremees View Post
    Will that blocking thing slow down webserver? Becaus I think they use everytime different IP, and that banned_ips.txt file will get long after some time.

    And what is a good way to follow access and error.log files? I made them to rotate like system log, and sended to my email as text. But email breaks those access log lines so that's hard to follow it.
    Well, you can use my ban list as well as the script (iptables) from here: http://wl500g.info/showthread.php?t=27852
    it should be up to date....and I suggest to have a closer look to my avoid brute force script, scanners are detected and blocked for a complete day by iptables.
    I have not recognized that anything is slow on my rtn when using this blocklist.
    Further, there are several ways how I control my webserver.
    When needed, I can help you to adapt my avbf2_6 script for gateway-usage.
    Just translate by google - and no worry - someone will guide you when any problem occurs.
    HTH
    Have fun
    newbiefan

    EDIT:
    Ah, I forgot: a good starting point to block Scanners and Script-Kiddies is to use url.access-deny capabilities of your lighttpd. Configure your lighty.conf to block scanners like ZmEU or Morpheus fucking scanner or without any agent aso....
    Here you have a sample config to do so: http://pastebin.com/PQuMbF3Y
    Last edited by newbiefan; 15-01-2012 at 18:13.
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Full server config: Samba ftp http xmail mysql forum motor
    By KisVuK in forum WL-500gP Tutorials
    Replies: 14
    Last Post: 15-12-2008, 21:34

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •