Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm using netconfig, and trying to make my IP static. I think I've got everything right, except I can't get my name server working. I use my ISPs DNS IPs right?
depending on what ISP you use, you may be unable to get a static IP addresss. If it's an internal(that is, on your own network), then you won't have a problem. If you really want an external static IP, check with your ISP, and see if there's a way for them to set one up for you.
I'm using netconfig, and trying to make my IP static. I think I've got everything right, except I can't get my name server working. I use my ISPs DNS IPs right?
if you have a Router
that is your DNS server.
gateway is the same number.
If you dont use a router I hope you have a static IP from you ISP.
then yes you use the ISP's DNS servers address.
if you have a router, you have an internal network. This will allow you to have a static ip address, but maybe not on the outside. If you have a router, you will point your nameserver to the internal ip of the router, and the router in turn will set up it's own nameservers. Why do you want a static ip?
I want an internal static IP, because my router firewall needs to unblock ports, but if the IP keeps changing, I have to keep changing the unblocked IP.
There is a more easy way to see if your address is internal or external (ie open to whole internet).
Does the address start with 192.168? Then it must be an internal address. Since the address keeps changing, then you're using DHCP (dynamic host control protocol). You need either DHCP for dynamic IPs or just a static IP.
Having a static external IP can be very costly. Most ISPs have only a limited set of IP addresses at their disposal and have to pay big amounts of money to get them. If you want one of them, reserved just for you, then that's going to cost you. Simple as that.
However, you probably don't need it.
Furthermore, if your address is internal, it's most likely that your router is handling the DHCP (think of it as the "handing out of the IP addresses"). If the router also has a built-in firewall, then it will adapt it's config for the changing IP addresses automatically. If the router and firewall are 2 separate devices, that's a different story.
I think, what you're looking for, is NAT support. NAT, or Network Address Translation, is often built into routers/firewalls and allows the firewall/router to make multiple computers externally visible with just 1 IP address (it translates this one, external IP address to the right internal IP address for each call using a simple lookup table). With NAT, but no DHCP, you would have static internal IPs.
Yes, it's the internal IP I want static. I already stated it. Everything works fine except that I cannot resolve hostnames as I said already.
I assume I'm entering the wrong IP for the nameserver. I've tried my routers IP as well as a DNS IPS from my ISP and neither work. If I use the router IP, it instantly responds with "unknown host" while with the DNS IP, it takes a while.
netconfig [OPTION...]
--bootproto=(dhcp|bootp|none) Boot protocol to use
--gateway=STRING Network gateway
--ip=STRING IP address
--nameserver=STRING Nameserver
--netmask=STRING Netmask
--hostname=STRING Hostname
--domain=STRING Domain name
-d, --device=STRING Network device
--nodns No DNS lookups
Help options:
-?, --help Show this help message
--usage Display brief usage message
Regardless
your gateway will be your routers ip
your ip will be an open IP from your router. do ifconfig and look at the settings. then use them to set yourself up i guess. It's much easier and faster to edit resolv.conf though
I know I'm using a valid IP. The gateway is my routers IP? I http to 192.168.100.1 to access my router setup, is that the routers IP? If so I've tried it. I still get "unknown host".
what kind of router is it? Yes the gateway is the routers ip. Use dhcp, look at the settings of ifconfig then use those to set up you configuration with netconfig. Pay close attention to nameserver. I'll bet that is where you are having probs.
it should be something like
nameserver x.x.x.x <- could be more x's like xx.xx.xx.xx this is from your isp.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.