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.
CABLE MODEM ==> HUB == > {( eth1) Linux ROUTER (eth0) } ==> FW/SQUID ==> LAN Clients
I am very new to Linux Networking Operating System. I have setup my network as above, I configured my router machine to forward and allow incoming packet on ports (20,21,22,80 and 443).but my problem lies on the firewall/squid machine configuration. All I intend to have on the machine is to allow incoming and outgoing packets from the client machines on ports (20,21,22,80 and 443) using iptables. But I wondered how this could be done since I have One Ethernet card on it.
Please can anyone assist me in writing iptables and or to give me an assistance on how I could achieve this goal.
I'm not completely clear what you diagram shows; is it processes or computers? Maybe its flow of data. Assuming that your diagram does show computers/boxes/hardware, then, while the set up that you chosen may not be the most desirable (hey, but you didn't ask about that, right?) it looks as if it is relatively simple to get something that 'sort-of' works. If, on the other hand, you have serious concerns about the users of the lan clients as hackers or you want to ensure that your system is set up to minimise the pain of maintaining it in future, maybe you want to reconsider this, rather than presenting as a fait accompli.
It seems to me that you could achieve what you want by using iptables on the router box to only allow connections on eth0 from the FW/SQUID box. You could limit connections by mac address or IP address. I don't generally like this solution because it builds in a maintenance problem, but then its your mainteneance problem, not mine.
You should also note that you don't seem to be protecting your router box from the internet. Maybe this is something that you have just omitted from the diagram because it wasn't really relevant to this particular question.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.