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 am running RH9.0 and I have set up a small LAN between a desktop (server) and a laptop (client). The desktop has two cards eth0 and eth1. I have access to the internet using eth0 which is set up via dhcp and I have access to my LAN through eth1 which I have set to a static address. The machines talk to each other fine and I have set up file sharing, no problem!!...until...... I try to get my laptop access to the internet. I have given my laptop the IP address of my desktop as a gateway but I'm not getting any access through the laptop browser. I have forwarding switched on but still no luck. Can anyone help???
I haven't done anything with routing, where do I find the routing packages and what are they called?? I haven't set up any masquerading either how do I check this??
i think there on either disk 2 or 3, cannot remember, use
redhat-config-packages as root.
basically, you need to configure iptables.
ive been speaking to some one else about this, aparently you dont ned the router packages, you can set it up manually.
become root, and post the output of the command
/sbin/iptables -L
iptables controlls all your network stuff like firewall rules and routing rules.
basically you need to add a rule that says if the network card recievs an ip packet thats addressed outside the local area network, ofrward that packet through to the modem.
its quite simple really, providing that your kernel has been configured and compiled to support IP MASQ, (which im 99% sure redhat is by default)
so you havnt actually told your pc to act as a router yet then.
follow the instructions at the link i posted, mainly....
Quote:
# Delete and flush. Default table is "filter". Others like "nat" must be explicitly stated.
iptables --flush - Flush all the rules in filter and nat tables
iptables --table nat --flush
iptables --delete-chain - Delete all chains that are not in default filter and nat table
iptables --table nat --delete-chain
# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward - Enables packet forwarding by kernel
you may neet to switch eth0 and eth1 depending on which is conected to lan, and which is connected to modem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.