# Question about DNS and my local intranet[SOLVED]

## linuxn00bie255

Hello, I have a question about DNS and my local college intranet. Basically I want to be able to ssh into my system without having to type in the entire IP address, and since it's dynamic it changes sometimes and it's not always fun to memorize it everytime it changes. I read somewhere that this has to do with DNS. I would assume my college is running a server is there a way I can have dhcpcd autoconfigure the DNS stuff or do I have to know the DNS ip address. Perhaps it is even more involved than that?

Either way, thanks for any help in advance!Last edited by linuxn00bie255 on Thu Feb 16, 2006 8:19 pm; edited 1 time in total

----------

## cogitate

If you are using DHCP, then the IP address of the DNS server is being passed down. I doubt the college is going to allow you to make a DNS entry for your personal computer. The easiest way to do this is to get a host name from http://www.dyndns.com, or something similar. There are clients you can run which will update the DNS entry you make each time your IP changes. Once you have a hostname and the client running, you should have no problems using ssh from anywhere.

----------

## Ctrl+Alt+Del

If you're not in control of that dns server, there's not much you can do about it.

the DNS Server needs an entry that tells users that your machines name is associated with the ipadress x.x.x.x. There are means to automatically add hosts to the dns server as they are connected to the dhcp server, but i have no idea how to achieve that  :Smile: 

Only thing you can do is add your machine to the /etc/hosts file from which you are connecting, but since it tends to change that won't be much help.

edit: damn got beaten. Doesn't dyndns filter LAN Ip's?

----------

## cogitate

I'm not sure if they do filter LAN IPs or not. I've never actually run into the problem, but then again, I've never tried to use a LAN IP either. Its quite possible that my solution will not work at all then. It is possible to add the host to the DNS server upon receipt of an IP, but the DNS server has to be configured to allow this, which I'm doubting is the case in a school environment.

Of course, there is always the option to go speak to the tech staff at the college. Worst thing they can do is say no.

----------

## linuxn00bie255

The tech support staff at the college makes it very clear that they only support windows... Which can be rather annoying. They aren't really very helpful in general. They may even ignore the e-mails I send them at this point. In regard to the hosts file, doesn't that mean that I would need to add that computer to the host file of every computer I'm on? In addition to using ssh I have a small ftp server setup for myself and a few of my friends and most of them run windows, so they don't have a hosts file. However I can ping any of their computers by the hostname they have setup in windows. So I guess I would like to know, why does it work under windows, or rather how?

Thanks guys!

----------

## cogitate

Windows does have a hosts file, its just burried. The hosts file only helps if the setup is static though, every time your IP changes you'd have to update the hosts file too, and yes, you'd have to do it on every computer.

Are the windows boxes getting a hostname pushed down from DNS or is it being set manually by the user?

If the network is a Windows network, then its possible that the names are being passed around using NetBIOS, which you can set up using Samba.

----------

## linuxn00bie255

ahh, it is a windows netowork, thanks, I'll check out the samba settings and see what I can come up with. If you happen to know what I need, that would be awesome too

Thanks again!

----------

## cogitate

Personally I don't have any experience with your exact situation, so I'm not sure how to set up Samba to annouce itself, although I know that the technology on the Windows side is called WINS and NetBIOS. There is a lot of this kind of setup in the forums, but also check http://www.samba.org.

Found a few others

Samba Quick Howto

Unofficial Samba HOWTO

----------

## Ctrl+Alt+Del

Netbios is NOT dns, samba cannot help you with anything but smb.

It will however not work for ssh or ftp. The name resolution that is..

----------

## linuxn00bie255

Thanks again guys, it's clear that I just need to learn more about networks. I'm going to consider this problem solved since the issue was really an error in my thought process!

Thanks again!

----------

## cogitate

I just realized something that might also help you, although it might not apply at all. I just finished setting up Bonjour (Rendezvous, zeroconf) between Gentoo and OS X. It announces services, or at least it can be configured to. There is a WAN portion to it, but its pretty much meant for LANs. It might not be what you're looking for, and this setup is largely dependant on how the college manages the networks, but it might work. I know Apple has a bonjour download for Windows clients (not sure about setup on that end, I just know it exists), and on the Linux end it was fairly simple to setup.

Apple's website for Bonjour

----------

## linuxn00bie255

Cool, I'll look into that the next time I have time, lol. Thanks again, you've been quite helpful

----------

## benster

If your university issues you an address via DHCP (see this wikipedia page) such as 192.168.*.*, or 10.*.*.*, or 172.16.*.*-176.31.*.*, then you have a private address.

These private addresses are meaningless on the public internet and are not routed at all, so external dyndns would only work if you had a meaningful non-private address. It depends if your university has been lucky enough to be awarded a large enough address space. Any good admin probably wouldn't let you alter their DNS configuration just for your convenience. But it's not hard for them to understand why such a change would be good for you.

If I were you I would just memorize the IP address once and "four" all. It's only four numbers in decimal. Just wait until IPv6 where you'll have to memorize 32 hexadecimal digits. Then I hope there's a better solution to local DNS.

It would be nice if DHCP provided for some sort of client-acknowledgement where you could obtain network configuration and tell the server your hostname at the same time. I guess this is what Rendezvous, er, Bonjour, ala zeroconf is for these days, but it's still not deployed everywhere and definitely not on servers. Some google searching for 'dhcp dns' reveals that microsoft supported something of this kind in the past, gentoo has no package hits, and debian has something only in its old stable distribution, woody, as 'dhcp-dns' is no longer in the archive.

----------

## Headrush

 *benster wrote:*   

> These private addresses are meaningless on the public internet and are not routed at all, so external dyndns would only work if you had a meaningful non-private address.

 

Not quite true. 

Although the various private IP ranges are not routed on the Internet, many DNS services will still return a private IP number for a DNS request. You could still setup a dynamic dns client to update your DNS entry to the private address given by your college DHCP service. You should be able to access your system from any computer on your LAN by using your DNS name rather than the IP.

I just tested with my zoneedit account and it worked.

----------

## Ctrl+Alt+Del

does not work with no-ip, they still detect my wan ip

----------

## linuxn00bie255

ah, ok, perhaps I will look into setting that up, it would be rather useful!

Thank ^_^

----------

## benster

 *Headrush wrote:*   

> Although the various private IP ranges are not routed on the Internet, many DNS services will still return a private IP number for a DNS request. You could still setup a dynamic dns client to update your DNS entry to the private address given by your college DHCP service. You should be able to access your system from any computer on your LAN by using your DNS name rather than the IP.
> 
> I just tested with my zoneedit account and it worked.

 

I didn't think about it that way - that would totally work for a private address on the campus network! Thanks Headrush, I'll have to put this trick away for a rainy day   :Very Happy:  .

----------

