Networking Forums

Networking Forums > Computer Networking > Linux Networking > Several issues with /etc/hosts.allow at a university setting

Reply
Thread Tools Display Modes

Several issues with /etc/hosts.allow at a university setting

 
 
dpdoughe@allvantage.com
Guest
Posts: n/a

 
      08-31-2005, 01:06 AM
Recently I was required to "register" my laptop (running Fedora 3) with
my university's computer support office in order to use their internet
on campus. Somehow in this self-guided on-line process they
automatically created a new hostname for my computer.

The next time I booted up with the ethernet connected, my computer
booted under this new hostname rather than localhost (as it will do if
I don't have the ethernet plugged in at boot time). Basically I am
very frustrated by this because I consider this having been "hacked".
I never created the hostname on my computer or did anything to tell my
computer that it should boot up under anything but localhost. Is this
some default setting in dhcp perhaps??? How to remove?

Other problems that occur of this new arrangement is that my display
won't work if booted under the new hostname. If I boot under localhost
(ethernet cable not plugged in) then I get display up (as usual). But
as soon as I plug the ethernet cable and do "/sbin/ifup eth0", the
hostname switches to the new host name and I lose the ability to open
any new apps requiring the display. I can do "xhost +" prior to
calling /sbin/ifup and everthing will work fine.

However, I've heard xhost + is an insecure way of doing things though
since it allows all hosts. Trying more restrictive "xhost hostname"
etc did not fix the display problem only "xhost +" seems to work.

Questions:
1) I don't want to be booted into the new host name even if the
ethernet is plugged in and active at boot. How do I turn off this
automatic "get thyself hacked" behavior. Basically when I want to
connect to the internet I'd like to a) switch to the new hostname and
then b) do /sbin/ifup eth0. In otherwords I want to be able to control
the hostname of my own damn computer. Seems reasonable to me...

2) I assume X is not aware of the new host name. I thought adding the
new host to /etc/hosts.allow was the prefered way rather than xhost +.
But this doesn't seem to do anything at all. Is /etc/hosts.allow the
correct file to use for this?

3) Another drag is that if I yank the connection to the internet after
being booted into the new host name, the display is again in a
non-functional state. How do I get back control of the display. In
other words, there should be a way of stating OK now go back to being
localhost and run display from there.

 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      08-31-2005, 01:21 AM
On 30 Aug 2005 18:06:37 -0700, (E-Mail Removed) wrote:
> Recently I was required to "register" my laptop (running Fedora 3) with
> my university's computer support office in order to use their internet
> on campus. Somehow in this self-guided on-line process they
> automatically created a new hostname for my computer.


Yes when dhcp is used and you have not disabled hostname your pc gets
a new new name.

What you could do is create a script to update /etc/hosts with your ip
address, and name your pc. That should stop your problem in either
mode. You would do a
man your_dhcp_client_name_here
to see what the script name needs to be created.


I am running mandrivalinux and do not know where things can be set of FC3.
You might put
NEEDHOSTNAME=no (followed by a carriage return)
in /etc/sysconfig/network-scripts/ifcfg-eth0

That stops name changes but a hostname of localhost will not do well.
Do set a name for your host.

$ cat /etc/sysconfig/network
HOSTNAME=fw <=== here is where node name goes
NETWORKING=yes
NETWORKING_IPV6=no
GATEWAYDEV=eth1
GATEWAY=24.1.202.1

$ head /etc/hosts
127.0.0.1 localhost
192.168.2.1 fw.home.invalid fw <==== alias here
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      08-31-2005, 07:19 AM
(E-Mail Removed) writes:

>Recently I was required to "register" my laptop (running Fedora 3) with
>my university's computer support office in order to use their internet
>on campus. Somehow in this self-guided on-line process they
>automatically created a new hostname for my computer.


It is complete lunacyto use localhost for the name of your machine.
Also dhcp by default asks for a new hostname and you have to specifically
ask it not to.


>The next time I booted up with the ethernet connected, my computer
>booted under this new hostname rather than localhost (as it will do if
>I don't have the ethernet plugged in at boot time). Basically I am
>very frustrated by this because I consider this having been "hacked".
>I never created the hostname on my computer or did anything to tell my


How can it be hacked when you asked it to give you a new hostname? That you
did so in ignorance is irrelevant. It is like signing a cntract without
reading it, and then complaining about the terms.

>computer that it should boot up under anything but localhost. Is this
>some default setting in dhcp perhaps??? How to remove?


Use man for the particular dhcp client you use.


>Other problems that occur of this new arrangement is that my display
>won't work if booted under the new hostname. If I boot under localhost
>(ethernet cable not plugged in) then I get display up (as usual). But
>as soon as I plug the ethernet cable and do "/sbin/ifup eth0", the
>hostname switches to the new host name and I lose the ability to open
>any new apps requiring the display. I can do "xhost +" prior to
>calling /sbin/ifup and everthing will work fine.


Yes, that is a feature of X.



>However, I've heard xhost + is an insecure way of doing things though
>since it allows all hosts. Trying more restrictive "xhost hostname"
>etc did not fix the display problem only "xhost +" seems to work.


>Questions:
>1) I don't want to be booted into the new host name even if the
>ethernet is plugged in and active at boot. How do I turn off this
>automatic "get thyself hacked" behavior. Basically when I want to

It is NOT a hack.
>connect to the internet I'd like to a) switch to the new hostname and
>then b) do /sbin/ifup eth0. In otherwords I want to be able to control
>the hostname of my own damn computer. Seems reasonable to me...


read the man page.


>2) I assume X is not aware of the new host name. I thought adding the
>new host to /etc/hosts.allow was the prefered way rather than xhost +.
>But this doesn't seem to do anything at all. Is /etc/hosts.allow the
>correct file to use for this?


No. X has opened itself on hostname:0 and your new computer name is
different. hosts.allow has nothing to do with this.

>3) Another drag is that if I yank the connection to the internet after
>being booted into the new host name, the display is again in a
>non-functional state. How do I get back control of the display. In
>other words, there should be a way of stating OK now go back to being
>localhost and run display from there.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advice for University work itogami Wireless Networks 1 05-26-2012 02:27 AM
Issues adding and setting up Wireless Printer with MN-700 router Steve A Wireless Networks 1 01-10-2010 06:44 PM
trying to connect to university wifi Edward.Huerta@gmail.com Linux Networking 3 01-19-2006 05:09 PM
hosts.deny and hosts.allow problem dan Linux Networking 3 06-15-2005 07:26 PM
hook on to university wireless with a ibook Bert Wireless Internet 0 08-12-2003 04:19 AM



1 2 3 4 5 6 7 8 9 10 11