Home Forums Gamescan Chat42 About
* Login   * Register * FAQ    * Search
It is currently Wed 08-27-2025 4:07PM

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: host.allow and host.deny help
PostPosted: Mon 02-27-2006 5:08PM 
Offline
Brigadier General
User avatar

Joined: Mon 07-26-2004 3:11PM
Posts: 1420

Source: Nagogami
I try and get a connection to my server but I can't, so I change host.allow to
Code:
ALL: ALL
but that doesn't work. Then I take everything out of host.deny and that doesn't work because
Code:
ALL: EXCEPT 127.0.0.1:DENY
keeps magically reappearing. So I delete host.deny and it just comes crawling back from the dead. What should I put in these files?


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Tue 02-28-2006 12:34AM 
Offline
Colonel
User avatar

Joined: Wed 02-20-2002 11:27PM
Posts: 867
Location: No one's really sure what became of Castorite after graduation

Source: Off Campus
What do you mean "trying to connect" to your server? Many standalone servers don't reference hosts.allow and hosts.deny for their connections. Is the service in question being run through TCP wrappers?

As far as the file being recreated... what OS/distribution are you running? Have you tried creating a read-only/immutable version of the file?

The thing that sticks out most is that your hosts.allow should be higher-priority than what's in your hosts.deny file. I'm not sure why you'd be having problems unless there's a configuration problem elsewhere. Perhaps you have a packet filter (firewall) of some sort with a broken ruleset?


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Tue 02-28-2006 5:51PM 
Offline
Brigadier General
User avatar

Joined: Mon 07-26-2004 3:11PM
Posts: 1420

Source: Nagogami
I set up ftp service and I'm trying to access it from a different computer.

I am running Mandrake 10 without a firewall.


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Wed 03-08-2006 3:38PM 
Offline
Colonel
User avatar

Joined: Wed 02-20-2002 11:27PM
Posts: 867
Location: No one's really sure what became of Castorite after graduation

Source: Off Campus
The 'different computer' wouldn't happen to be an off-campus computer, would it? UMR IT blocks inbound FTP connections to most of the campus network.

Have you tried connecting to it from itself? Give it a try with a command line FTP client. They're much more verbose when problems develop, and should help you pinpoint the problem fairly quickly.

Exacly what kind of problems are you seeing? Is the connection being refused, timing out, or immediately disconnecting? They all have different implications as to what's wrong.

I don't think the problem is in hosts.allow and hosts.deny. Your inetd service should be allowing proper passthrough if hosts.allow has "ALL: ALL" in it.


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Wed 03-08-2006 7:22PM 
Offline
Brigadier General
User avatar

Joined: Mon 07-26-2004 3:11PM
Posts: 1420

Source: Nagogami
Both computers are on campus.

I'll try connecting from itself.

The connection is being refused. It finds the host and during authorization I get cut off with "The connection has been refused"

_________________
Don't do drugs because if you do drugs you'll go to prison, and drugs are really expensive in prison.


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Mon 03-13-2006 1:37AM 
Offline
Brigadier General
User avatar

Joined: Mon 07-26-2004 3:11PM
Posts: 1420

Source: Nagogami
Update: I can connect to it just fine after changing the host files. I basically took everything out. Things worked fine last night one night, so I didn't touch it and went to sleep. The next day it didn't work. It didn't even get touched during the whole time but somehow managed to change the host files back to their unwanted previous forms. Everytime I reboot it also changes the host files back. How do I prevent linux from changing the host files?

_________________
Don't do drugs because if you do drugs you'll go to prison, and drugs are really expensive in prison.


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Fri 03-31-2006 9:13PM 
Offline
Colonel
User avatar

Joined: Wed 02-20-2002 11:27PM
Posts: 867
Location: No one's really sure what became of Castorite after graduation

Source: Off Campus
Agentzak wrote:
How do I prevent linux from changing the host files?

Provided the automation bulldada Mandriva likes to add to their distro doesn't detect it, you can probably get by with making those files read-only.
Code:
# chmod ugo-w /etc/hosts.allow /etc/hosts.deny


As far as I know, Linux has broken immutable file support with the default security mode and standard file systems. You probably aren't going to switch to OpenBSD, so I'll set that idea aside.

If the read-only file trick doesn't work, you could be even more kludgey and link the files to /dev/null. Both hard links and symlinks should work, but you've obviously gotta use symlinks across file systems.
Code:
# ln -sf /dev/null /etc/hosts.allow
# ln -sf /dev/null /etc/hosts.deny



I'm still rather mystified as to why this problem revolves around those files. What FTP server and version are you running?


Top
 Profile E-mail  
    
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group