0

Can anyone point me in the right direction on what should i do in order to be able to ping a linux server from inside a windows network (with a domain)?

I've searched on google and found several different info and it doesn't seem to be consistent and up to date. I've read NetBIOS is not the way to do it. How should i do it if I don't have access to the company's router so that is not an option.

I tried using samba with the following config:

    workgroup = us.mycompany.com #this is the domain name
    server string = Samba Server Version %v

    netbios name = zeus 

however i still can't ping the linux server from windows computers.

Thanks!

nmuntz
  • 132
  • 1
  • 6
  • You mean you can't ping the Linux server's IP address or hostname? – George Tasioulis Sep 27 '11 at 16:46
  • @GeorgeTasioulis the hostname – nmuntz Sep 27 '11 at 16:55
  • To allow DDNS updates to AD DNS your linux-box has to have an account within the windows-domain. So why don`t you have access to that AD-server (i.e. to the sysadmin managing that AD)? – Nils Sep 27 '11 at 20:48
  • @Nils: That's not strictly true. If DHCP is assigning ip addresses to the clients then the DHCP server can be configured to update DNS on behalf of the clients. In addition, if the DNS zone is configured to allow unsecure updates then any client can register and update it's corresponding records in DNS. – joeqwerty Sep 28 '11 at 01:40
  • But you should not allow insecure updates - else you risk some DNS-spoofing attacks. But since there is no access to the AD-server there is propably also no access to a Windows-DHCP-server within the domain as well. – Nils Sep 28 '11 at 20:43

5 Answers5

5

One of three scenarios applies:

  1. You are using this Linux box strictly for your own legitimate development/testing purposes, and you want to be able to ping it from a few Windows machines that you control. In this case, the easiest way would be to add a line to \windows\system32\drivers\etc\hosts on each of your machines.

  2. Your boss has asked you to set up an exciting new intranet service that everyone in the company needs to be able to reach. For some unimpressive reason, it is running on a tower-shaped box under your desk instead of on a newly-provisioned virtual machine in the server room. In this case, you should contact your friendly network/systems administrator and ask for an "A" record to be added for this machine. Don't forget to ask for a static IP address and/or DHCP reservation, OK?

  3. You are setting up an unauthorized "rogue" server on the network. You want it to be reachable by name from throughout the company, but you don't want to ask the network administrator for an "A" record because he or she might not approve of what you're doing. In this case, you are beyond our help, but we hope that you enjoy your unscheduled career change.

Skyhawk
  • 14,200
  • 4
  • 53
  • 95
3

Configure the Linux server in the domain's DNS, or configure the Linux server to send DNS UPDATE commands to the domain's DNS servers if dynamic updates are allowed.

Shane Madden
  • 114,520
  • 13
  • 181
  • 251
  • 2
    DDNS is a good idea as well, again assuming the AD servers are configure to allow unsecure updates. On the flip-side you could allow the Linux machine take a DHCP address and make sure DHCP is configured to register the leases with DNS. – Coding Gorilla Sep 27 '11 at 16:58
  • @Shane Madden: could you please give me more info on what utility should i look up to manually send dns update commands? – nmuntz Sep 27 '11 at 17:02
  • @CodingGorilla: i'll take a look at DDNS. Thank you! – nmuntz Sep 27 '11 at 17:02
2

I'm assuming by "... a windows network (with a domain)" that you mean you have an Windows server with an Active Directory domain. So one of your AD servers should be hosting DNS for the domain. So go to that server and load the DNS console, and add a host record (A) to your mydomain.local (or whatever it is) with the host name of the linux machine and it's IP address.

Coding Gorilla
  • 1,938
  • 12
  • 10
  • I don't have access to any of the AD servers. Is there any other way to solve this? – nmuntz Sep 27 '11 at 16:52
  • The only other way would be to modify the hosts file on _all_ machines in the domain; which isn't really feasible. You could also theoretically use WINS, but if you dont have access to the DNS, you probably don't have access to that either. – Coding Gorilla Sep 27 '11 at 16:57
  • 2
    But... there must be *someone* with access to the AD server. Can't you contact him and ask him to add an A record? – George Tasioulis Sep 27 '11 at 17:23
2

For Netbios to work you need to ensure nmbd is running, which is part of samba: http://www.samba.org/samba/docs/man/manpages-3/nmbd.8.html

However I would say it's better to be using DNS these days. Make sure the the client is configured to update DNS when it requests an IP.

If it's a static IP you want, you need control over either the DHCP server to make a static assignment, or the DNS server to create an A record. Failing both of the above you may be able to make nmbd work.

Alex Forbes
  • 2,452
  • 2
  • 20
  • 26
  • This solution is the best when: - No domain - Linux is replacing a Windows machine and you want it to work as it was: using the name of the machine. – Master DJon Feb 19 '18 at 03:35
0

If you don't have access to the DNS server(s) then you're going to be limited in what you can do to resolve this. The best solution would be if the Linux host supports dynamic DNS updates then configure it and set the DNS suffix to match your AD DNS zone name. You'll need to configure your AD DNS zone to allow unsecure updates... but if you don't have access to the DNS server(s)...

Alternately, if you're using a Windows DHCP server in your network you can configure it to always update client A and PTR records with the DNS server, but if you don't have access to the DNS server(s) then you probably don't have access to the DHCP server either...

joeqwerty
  • 109,901
  • 6
  • 81
  • 172