Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Originally posted by PEACEDOG edit /etc/resolv.conf
nameserver 192.168.0.1
good luck.
That's for DNS. Add your ISP's DNS servers in that file, not gateway.
To set as your gateway, simply do this at a terminal as root or console:
route add default gw 192.168.0.1
If you tell us what specific distro you are doing this in, I'm sure someone will be able to tell you how to add it permanently so it gets set each time.
Well, here is what your information would (probably) be for your ip:
address 192.168.0.x (x is the last octet of your ip)
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
These settings go in a variety of different places on different linux distros. If you post which one you need help with ...
Originally posted by PEACEDOG sorry didn't mean to give bogus info, rechecked my system and, the proper file is /etc/rc.d/rc.inet1.conf. there is a line in the file
# Default gateway IP address:
GATEWAY="192.168.0.1"
should've checked that before posting, sometimes i think before i answer, sometimes i answer before i think. again my apologies.
the way specified is for slackware...
if you don't use slackware, you need to tell us what distribution you use.
it's different for every distribution.
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296
Rep:
Quote:
the way specified is for slackware...
if you don't use slackware, you need to tell us what distribution you use.
it's different for every distribution.
you are correct, the information i posted is for slackware. you are also correct that every distro is different, as i have only used a few it would be impossible to post the correct answer for all distros. if you would like to help in that endeavor, then my thanks be to you. ;-)
well.. if the gateway is configured correctly, you would be able to access the external network (the internet, in your case)...
but if you were able to access the internet without configuring that, it most likely has been configured by DHCPCD already.
since you have a router already, you wouldn't need iptables. iptables is a firewall and also lets your computer be a gateway.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.