sharing Internet In Linux Redhat

At up to this stage, is the end of the process for ICS on your Local Network. Here is not too long because only one line of command used to open your Internet sharing to your clients. Well let us directly trace why until only 1 (one) line just ordered.

To make sharing basically for the layman does not understand and feel hard, is actually just very simple. Note the following command

IPTABLES-A POSTROUTING-j MASQUERADE-t nat-s 192.168.0.0/24-o ppp0
In order for your modem can be shared to the network, then the above command is to open sharing for your modem. Meanwhile, to allow the client to the network through the Internet via your server, you must first enable IP forwarding which is in the input pasa IPTABLES with chains FORWAD with any client that will be received access, writing sample is as follows

IPTABLES-A FORWARD-i eth0-s 192.168.0.2-j ACCEPT

Where eth0 is your ETHERNET CARD and-s 192.168.0.2 is the IP Address your client, if you want to share it all at once you do not have to bother - bother to write down all your client IP address one by one, but penulisannnya can immediately once with 1 (one) lines, please see below

IPTABLES-A FORWARD-i eth0-s 192.168.0.0/24-j ACCEPT

So is not it? a minute, why can only form of direct xxx.xxx.0.0/24 could all? well let me explain. 192.168.0.0/24 is the IP can be classified in Class E of IP Prefix is the IP Range where the form that will be reached within a one-time writing, writing more details on such claim from 192.168.0.1 up to 192 168 255 255 be received for the use of Sharing or the like, it's pretty obvious is not it? Similarly, this ICS sharing technique, oh yes finished? oh yes you have to write another one (1) a short sentence in order to open the IP forwarding in addition to the IPTABLES, you must add

sentence below

echo 1> / proc/sys/net/ipv4/ip_forward

Especially is this? need to be explained again huh? moment! explain more details later I will write the next article, because if I describe this moment I am sure will membingungkanAnda, I write this just to make for beginners if needed to make the ICS in quick time. So for more details IPTABLES problem I will discuss in the next discussion topic.

Pay attention!, All IPTABLES command can you enter in the scripts in / etc or you create your own folders and will be staying on the call in / etc / rc.local or you just want to more easily enter the rc.local file in / etc . As I do though more easily in the search if there is a change in the future. Remember here we are looking for convenience to the emergency rather than seek safety in an emergency, it is better for security as well as in emergencies as well, but we can fix it later when ICSnya already finished, so is not it? :)

Okay, so I think it's probably best to explain this ICS. Hope this is useful to you all, now let's get to the next section. :)

No comments:

Post a Comment

 
 
Blogger Templates