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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have some problems in writing iptables rules .I setup ubuntu gateway server.My configurations are given below
eth0 : 192.168.1.222 is connected to the local network
eth1 : 22.214.171.124 is connected to the internet
eth2 :192.168.3.1 is connected to another network
eth3 :192.168.4.1 is connected to another network
Here I designed 192.168.1.0 network for servers. In this network, many local services are running .So other 192.168.3.0 & 192.168.4.0 network should connect to the 192.168.1.0 network and viceversa. But I dont want to connect 192.168.3.0 network to the 192.168.4.0 network and viceversa.In my configuration 192.168.1.0 network,192.168.1.222 is gateway and for 192.168.3.0 network,192.168.3.1 is gateway and for 192.168.4.0 network,192.168.4.1 is gateway.I tested all gateways and all are working fine.But problem is with the intercommunication of the networks.I dont want to communicate 192.168.3.0 to 192.168.4.0 network and viceversa.
I wrote iptables rules but it is not completely successful.I tried to block icmp protocol.
You need to clarify your network policies. All these numbers don't help.
State your rules in terms of packets and pick reasonable variable names for your networks.
In order, you have LAN, inet, net3, net4 ... fine.
the LAN net has many servers. The server we are configuring sits between networks.
packets from net3 and net4 must be able to reach LAN (and reverse)
packets must not flow between net3 and net4
- packets from net3 addressed to net4 are dropped
- packets from net4 addressed to net3 are dropped
- packets from net3 to LAN are allowed
- packets from net4 to LAN are allowed
eth0 traffic to the internet goes to eth1.
eth2 traffic to the internet goes to eth1
eth3 traffic to the internet goes to eth1
... you can do this with port forwarding etc.
the gateway addresses are only important to hosts on the various networks.
I hope this turns out useful.
I am assuming you can issue iptables commands and understand the language used in the various documents and howtos. The trick is to fit your own ideas of what needs to be done with the language of security being used by those documents and the iptables commands themselves.
Once that is done, the answer is usually pretty clear cut.
But it may not be - if you get confused anywhere, just let us know.