PDA

View Full Version : Problem with ip restriction.


odd
03-03-2007, 11:07 AM
Im useing 5.8.5r and Im started useing hostname like *@*.isp.com instead of an ip-address because I get new ips from my ISP very offen.

Today I noticed a weird thing.

I Couldnt login to my account and the error.log stated that I had a ipaddress that didnt match my allowed addresses.

So I looked it up and I noticed that my ip address was correct but still ioftpd wouldnt let me in. Now 40mins later the problem seems to have resolved and Im able to login again.
I havent done anything except tryed again 40mins later.

Have anyone had such problem, is there maybe a way to fix it?

Yil
03-03-2007, 11:04 PM
In order to match a domain NAME ioFTPD has to reverse name resolve your IP. Perhaps it wasn't able to do so for a while and thus wouldn't let you in. Cacheing somewhere along the way might have made a one minute problem a 40 minutes one...

I'm not sure about this but I think the error.log should give a clue here. If it says it rejected you from *@1.2.3.4 then it probably couldn't reverse resolve you and thus you couldn't match. If it says *@...isp.com then it did resolve you OK and something else is going on...

odd
04-07-2007, 05:45 AM
Ok Yil

I got the same problem today.

04-07-2007 12:38:48 Host '*@111.111.111.111' did not match any of user 'test' allowed hosts.

Im useing hostname *@*.myisp.com in my allow ip's. So I guess I will have to wait it out.
Have tried to restart ioftpd.exe but problem is still there.

ArtX
04-07-2007, 06:36 PM
are you behind a router or directly connected to the internet - also have you edited the Hosts.Rules file properly (not saying you havent but best to check all areas) :) - you could always try adding ACCEPT H *@*.isp.com ADMIN -1 (dont know if its poss or it willl even work, and could be a security issue for all i know), its late and i have been to the pub :p

Yil
04-07-2007, 09:19 PM
Hey odd. That's exactly what I thought the problem was.

4-07-2007 12:38:48 Host '*@111.111.111.111' did not match any of user 'test' allowed hosts.

Should look like

4-07-2007 12:38:48 Host '*@myisp.com' did not match any of user 'test' allowed hosts.

if ioFTPD was able to reverse resolve the name via gethostbyaddr().

Now that the call failed (and there aren't any ioFTPD configurable options to the windows call) it's value is cached internally for

Hostname_Cache_Duration = 1800 # Seconds cached hostname is valid

from the ioFTPD.ini file.

If you can't login for a long period of time, try setting this to 300 or something to force ioFTPD to try again sooner. Also of importance here is Windows XP has a DNS Client service that caches answers for you and that may cache the failure. XP I think has a 15 minutes default timeout so there may be nothing you can do. The only way I know of to get around DNS Client is to turn it off or to use "ipconfig /flushdns" which is only useful if you're at the computer... The good news is the DNS Client probably caches an answer even if it takes 3 minutes to get which means it would respond to ioFTPD correctly the next time ioFTPD asks which is why setting the .ini option may help.