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.
I'm just now starting to mess with setting up my linux box as a router. I have it up and runnig now, but I don't entirely understand how. The question I have is, what causes a packet to go to the FORWARD chain? My default policy for INPUT is ACCEPT and I have no rules. Same for OUTPUT. All the rules are on the FORWARD chain, but I don't see what causes packets to jump to that chain. Help?
FORWARD is used for packets that must pass through the box to get to their destination.
For local packets, the destination ip address is somewhere in the Internet, so the routing table decides they have to go thru' FORWARD. This is called using the box as a Gateway.
For incoming packets, the nat PREROUTING table needs to give the packets an address that is in the local network before they go thru' the FORWARD chain. This is called DNAT, 'destination network address translation'.
Have a read of his tutorial for extra indepth info.
Last edited by peter_robb; 12-12-2003 at 02:20 PM.
When a packet is received, the first chain it hits is the INPUT chain, right? And if there are no rules on the INPUT chain and the default policy for that chain is ACCEPT, then what happens after it hits the default policy? There's no jump involved. Does it automatically go to the FORWARD chain at that point or what?
Also, how do you indicate that all incoming packets on a particular interface are destined for the local machine, and not to be routed? I want my linux machine to run a few servers (HTTP, VNC, FTP, SSH, etc), and it has to respond to incoming requests rather than dropping or forwarding them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.