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.
After much ado, I got my local LAN working. I can see files on the other computer, etc.
But I can't connect to the net from newcomp (192.168.3.10) via oldcomp (192.168.3.9), although that is the address set as gateway.
Can anyone help? A tip about what conf files may need altering? I set things up by hand in exports, host.allow and host.deny, as I found the wizards couldn't do it right.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
(assuming eth0 is your external nic)
I think this is enough to have internet on both computers...
You should search a bit more the forum and the internet. There are lots of how-to about this. You should also read the iptables documentation at iptables website (netfilter) and undestand how it works and set up a firewall.
I started by using some iptables rules I found on this forum. After understanding how iptables works, I changed them to fit my needs.
The last time I messed with iptables via LinWiz, an automatic configurer, nothing worked and the network was blocked.
If I enter the above iptables command, where does it write to? The conf file? So that I can erase it if needed!
iptables is an executable, right? Does it read a .conf file when executed? Which file contains all the ACCEPT and REJECT and CHAINS and so on? I didn't see that in the man page, but then it is very long!
Thanks
Peter
AFAIK, iptables doesn't read any conf file by default. You can save iptables rules to a file and then restore them with iptables-save and iptables-restore.
I did exactly as you said, I have a 1 in ip_forward, and entered the command
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
but, no access from the computer without a modem!
I just get "could not be found".
Got any more tips??
No, I don't know if I have a DNS service running, but I'll look into it. Now, as the wife and boys aren't here, it's quiet!
But I know that on the new computer I did set the gateway to 192.168.3.9, somewhere in a wizard.
Your ISP should have a DNS server running. The computers using the gateway must know the DNS server address or they wont be able to query it about hostnames. DNS servers translate hostnames into IP addresses.
I have a DHCP server running on my gateway that automaticaly configures all computers' network interfaces with this info. You can learn how to configure something like this or you can add a fixed address to each computer.
But I'm not sure this is your only problem. To test this you can try pinging an IP address from your new computer. Try
ping 64.179.4.149
This is linuxquestions.org ip address. If you get an answer, you can connect to the internet. Now try
If this time you don't get any answer, you're problem is the name resolution, ie, you have to configure your new computer with the DNS server IP address.
My comps have fixed addresses
oldcomp is 192.168.3.9
newcomp is 192.168.3.10
I told the newcomp to use oldcomp as a gateway, using the number, not the name.
ping 64.179.4.149 is stalled at this moment, so I guess it can't reach outside. I'll have to kill it.
With just two comps, I don't think I need dhcp, although I have set it up, once.
Ping is still stalled, I'll get back to you,
Thanks Peter
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.