Originally Posted by prashsharma
But how can I do that? Can you provide m the steps?
I actually provided two links to give you a good idea of what you're up against. The links are to the relevant pages of the RHEL 4.0 manual. Did you even look at them? The most basic iptables configuration to provide NAT to a LAN would go something like:
iptables -P FORWARD DROP
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i $LAN_IFACE -o $WAN_IFACE -m state --state NEW -j ACCEPT
iptables -t nat -A POSTROUTING -o $WAN_IFACE -j MASQUERADE
To enable IP forwarding, you do a:
echo "1" > /proc/sys/net/ipv4/ip_forward
If you want a page that explains what NAT is, click here
. For a good iptables tutorial, click here
. The tutorial is relatively advanced, don't think that you need to master everything in it. But you definitely should have a good general understanding of what iptables is and how it works. Any other information you need to get this working is just a Google away. Or search through the forums here at LQ because these types of setups are covered quite often.
Asking for a step-by-step is a pretty tall order, you will have much better chances of getting help if you first read-up on this, then give it a shot, and then come-back with specific questions about any snags you hit along the way.