Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, Lets say I have two computers both running windows XP, computer 1 is named: comp1 and computer 2 named: comp2. I can access each computer’s shared folders with //comp1 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    17

    Hostname (Device Name) on local network


    Hi,

    Lets say I have two computers both running windows XP, computer 1 is named: comp1 and computer 2 named: comp2.

    I can access each computer’s shared folders with //comp1 from computer 2 and //comp2 from computer 1.

    I also have a third computer running CentOS, the hostname is “server.” From computer 1 I cannot access the server’s shares by typing //server, but if I type //192.168.0.4 (its local ip address on the network) I can access the shares.

    How can I make it possible to give my server a name on the network and allow each connected device to access it with a simple hostname such as “server?”

    Hope that makes sense since I have no idea what to Google for!

    Many regards,
    Charlie.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    edit the "hosts" file on the WinXP boxes - that's the easy way.

    in the Run box type:

    Code:
    notepad %windir%\system32\drivers\etc\hosts
    then add an entry for the Linux server, e.g.:

    Code:
    192.168.0.4     server
    note: you might need remove write-protection on the "hosts" file first.

    You can do this another way: by enabling NetBIOS on the samba server on the CentOS box, but try the other way first.

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    17
    Thank you... I did it with NetBios

    I knew about the first method but I felt that was cheating a little.

    Also, I had to disable the firewall on the CentOS box.

    Thanks again,
    Charlie.

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by Chaslington View Post
    Thank you... I did it with NetBios

    I knew about the first method but I felt that was cheating a little.
    yeah, you are right - that is the proper way to do it!

    Also, I had to disable the firewall on the CentOS box.
    if you want to re-enable your firewall, try the system-config-firewall tool. it is pretty good, at least in CentOS 6 (haven't used it in CentOS 5).

    The iptables commands themselves would look something like:
    Code:
    -A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
    -A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT

Posting Permissions

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