Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

No such file or directory

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
davect99



Joined: 04 Oct 2010
Posts: 44

PostPosted: Sun Oct 31, 2010 2:21 pm    Post subject: No such file or directory Reply with quote

Running two mount points and I get frequent messages in the error log pertaining to only one of them (2ngtest):
[2010-10-31 09:50:27] WARN fserve/ req for file "./web/2ngtest/index.html" No such file or directory

Any reason why the server might be looking in the web folder for an html file with the name of that mount point? It does not happen with the other mount point.
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Oct 31, 2010 3:15 pm    Post subject: Reply with quote

This is probably down to a botnet that some have experienced before, lots of IPs issuing requests for <mount>/index.html. The ones I've seen have typically come from Germany and have been known to cause a DoS attack with sites with many streams. The fact that you only see one is probably because that is the only one identified so far.

There has been a few ideas to try to resolve this.

One is to run fail2ban against the access log, and ban these IPs for a few hours (some of the ISP cycle IPs so blocking for a very long time may not be the best approach). This can be done against any icecast version and the firewall drops the request. This is probably fine for a few streams but I've noticed problems if you have many streams on icecast getting hit.

In the kh tree I have experimented with a ban-client option to automatically add the IP to the internal icecast banned IP list for a certain amount of time. This works on any platform but it does not interact with the firewall so the incoming client is just dropped at the icecast accept stage, not the firewall. This can be done with

<mount>
<mount-name>/*/index.html</mount-name>
<ban-client>7200</ban-client>
</mount>

You could use auth command/url listener_add to filter the listener based on IP. This will be slower than the previous options but allows for flexibility in processing the IPs and interacting with the firewall.

I was wondering whether extending the ban-client method to run a command such as iptables would be better. That should allow for people running on other platforms interacting with their firewall.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
davect99



Joined: 04 Oct 2010
Posts: 44

PostPosted: Sun Oct 31, 2010 3:26 pm    Post subject: Reply with quote

Forgot to mention I'm running the win32 version of v2.3.2-kh27.1 so I won't be able to use fail2ban (that's Linux only I believe). I'll try the ban-client option.
Back to top
View user's profile Send private message
davect99



Joined: 04 Oct 2010
Posts: 44

PostPosted: Sun Oct 31, 2010 6:34 pm    Post subject: Reply with quote

This doesn't appear to be having any effect...
Code:
<mount>
<mount-name>/*/index.html</mount-name>
<ban-client>7200</ban-client>
</mount>
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Oct 31, 2010 7:12 pm    Post subject: Reply with quote

do you have the <deny-ip> file setting, even if it is an empty file, it still needs to be defined because it uses the same internal cache.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
davect99



Joined: 04 Oct 2010
Posts: 44

PostPosted: Sun Oct 31, 2010 7:34 pm    Post subject: Reply with quote

karlH wrote:
do you have the <deny-ip> file setting, even if it is an empty file, it still needs to be defined because it uses the same internal cache.

karl.

I tried <deny-ip>./logs</deny-ip> in the <paths> section but it logs a "permission denied" error whenever the server tries to access that folder. Do I need to point that to an actual file or just a directory? Any particular file name?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Oct 31, 2010 8:22 pm    Post subject: Reply with quote

to an empty file at least, normally it would contain IPs that are always rejected.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
davect99



Joined: 04 Oct 2010
Posts: 44

PostPosted: Sun Oct 31, 2010 8:28 pm    Post subject: Reply with quote

So <deny-ip>./web/deny.txt</deny-ip> should be OK?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Nov 01, 2010 2:11 am    Post subject: Reply with quote

assuming that is the path to the file you want then yes. check your error log to make sure the file is accessed

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber