I've got a linux ubuntu media server running in my house but I've got two small problems with it. How can I set it with a perminate IP so I will not have to physically go to the box each time I turn it on to check the IP? Also, if I do this will my netgear router be smart enough to know not to set any other computer or device in the house with the same IP?

Secondly, how can I get my ubuntu server a fully qualified domain name so I can ssh into the server without using the ip at all?

ssh garrett@ipaddess

vs

ssh garrett@GastonMedia

Recommended Answers

All 6 Replies

So with regard to setting a static IP address on Ubuntu..I cannot be of assistance.

With regard to the netgear router being smart enough... What you need to do is log into your netgear router and make sure that your DHCP range is only a subset of the local subnet range. For instance, if your IP subnet is 192.168.1.x/24, set the DHCP scope so that the available IP leases fall within a range such as 192.168.1.1-192.168.1.200. Then use 201-254 for static IP addressing.

To get a fully qualified domain name, you need to register a domain name with a registrar such as Network Solutions, GoDaddy, etc.. If you already own GastonMedia.com, then you would have to make sure that their is a record in the dns zone for gastonmedia.com pointing to the public Ip address of your internet router. For this, you would need to have a static public IP address. If you do not know your public IP address, from within your network, visit http://www.mysourceip.com.

so for ssh, it would be garrett@gastonmedia.com, or just create a new DNS record...called ssh, so it would be garrett@ssh.gastonmedia.com. Point that record to the public IP address.

On your internet router, you will need to create a forwarding rule to pass traffic through your router for SSH traffic from the public IP to the private IP within your network.

Assuming you just want an internal network address, you need to go into the dhcp setup page on the local router and see what the dhcp address range is. Then you go into the network manager application on ubuntu and set the network interface to use a static address that is outside of that range. You will also have to set the netmask, dns, and gateway addresses, so before you do that, run the ifconfig command to see what those values are for the dhcp address you have now.

JorgeM, I was not wanting to open up the server to the whole world, just to my local network. So are you telling me taht Ireally need to register the name with an addressing company and open up a whole new bag of security issues just to be able to type user@host rather than user@IPthatConstantlyChanges?

Rubberman, I know this is a really basic and stupid question but how do I find the ip address of my netgear router?

I misunderstood you question and/or I assumed that you wanted access from outside your network. Of course I wouldnt suggest you having to register a domain name for internal access only.

If you want to find out the IP address of your Internet router, just from any computer on the network, display your IP settings (from a Windows client, you would run the command prompt, and type ipconfig), and look at the default gateway IP address. This is the IP of your internet router.

If from inside your network, you want to access your server by hostname, you can either modify the HOSTS file on each client computer from within your network, or have a local DNS server service running inside your network. If you only have a handful of clients, the HOSTS file is the quicket and easiest way to implement this.

JorgeM, normally when I type ipconfig it gives me the ip address of that particular computer that I happen to be typing the command on, not the router, am I missing something here? What and where can I find a HOSTS file. The media server in the house is an ubuntu server, it's the only computer that is wire streight to the netgear router. The rest of the computer in the house are mixed, mostly Windows with one or two more Linux systems.

On a windows computer, ipconfig will give you the IP, subnet mask and default gateway.

The hosts file is not windows specific, but in a windows system it is located in c:\windows\system32\drivers\etc\

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.