Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
I'm having trouble connecting to my Linux box from my Windows box using VNC. I have a line in my /etc/hosts.allow file that reads 'ALL : <windowsbox>' and this doesn't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    PA
    PA is offline
    Just Joined!
    Join Date
    Sep 2003
    Posts
    16

    VNC server and /etc/hosts.allow


    I'm having trouble connecting to my Linux box from my Windows box using VNC. I have a line in my /etc/hosts.allow file that reads 'ALL : <windowsbox>' and this doesn't allow the connection. On the other hand, 'ALL : ALL' works fine. This shouldn't be necessary. I thought maybe the connection was being forwarded through some other server on the network but netstat tells me I'm connected straight to my Windows box. VNCserver is not running through inetd or xinetd and the firewall is turned off. Has anyone any ideas?

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Can't it simply be a name resolving problem? Have you tried to allow the IP address in hosts.allow?

  3. #3
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    You dont have to do anything else then to start your vnvserver with /etc/init.d/vncserver start and then connect with you vnviewer.

    Try to specifie the ipadress instead of the hostname and the format to connect in vncviewer should be:

    Code:
    <ipadress>&#58;1
    :1 tells witch desk/display you shall have.....
    Regards

    Andutt

  4. #4
    PA
    PA is offline
    Just Joined!
    Join Date
    Sep 2003
    Posts
    16
    Thanks for responding, guys.

    Dolda2000, I haven't tried that but I will. The thing is, the line works just fine for other services as do similar lines for other hosts. I have the IP address paired up with the name of the Windows box in /etc/hosts and also the line "order hosts,bind" in /etc/host.conf which should be all that's needed for the Linux box to resolve hostnames.

    andutt, that is what I'm doing. I've also tried replacing the display number with the port number that vncserver is listening to (5901), even though I know that's not what you're meant to do (so, obviously that didn't work either!). I haven't tried using the hostname of the Linux box instead of it's IP address because that name isn't known on the network anyway.

    By the way, guys, I forgot to mention that the log file in $HOME/.vnc/ contains "Connection refused from host <Windows IP Address>" once for each time I try to connect so at least I know that the connection attempt is getting through. I'm going to try connecting through a browser to port 5801 and see if that proves anything...

  5. #5
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Do you have any firewall enabled on your windows box?? If you are running XP it has a tiny firewall buildt in..
    Regards

    Andutt

  6. #6
    PA
    PA is offline
    Just Joined!
    Join Date
    Sep 2003
    Posts
    16
    Nope, no firewall, its Windows 2000 Pro. Anyway, like I said, putting 'ALL : ALL' in /etc/hosts.allow works. Well, at least I'm not the only one baffled by this!

  7. #7
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Did you try to specify it by IP address?

  8. #8
    PA
    PA is offline
    Just Joined!
    Join Date
    Sep 2003
    Posts
    16
    Its working now when I put the IP address of the Windows machine in /etc/hosts.allow instead of its hostname. Not sure why I should have to since the hostname is in /etc/hosts and that's always been enough before -- maybe vncserver somehow bypasses /etc/hosts...
    Anyway, I'm happy enough now as long as I don't have to have 'ALL:ALL' in /etc/hosts.allow.

    Thanks for your help guys!

  9. #9
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Thats a little weird...which distribution are u using???
    Regards

    Andutt

  10. #10
    PA
    PA is offline
    Just Joined!
    Join Date
    Sep 2003
    Posts
    16
    Its a bog-standard RedHat 8.0 with no software that's not on the install disks.

Page 1 of 2 1 2 LastLast

Posting Permissions

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