LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   share internet through NAT in iptables.... (https://www.linuxquestions.org/questions/linux-newbie-8/share-internet-through-nat-in-iptables-4175454169/)

jitendra.sharma 03-15-2013 06:09 AM

share internet through NAT in iptables....
 
i have two lan card on my pc
eth0 - 172.16.0.254 ( Private )
eth1 - 10.0.3.12 ( public, Internet )

I want to route my packets Private to Public Network Via iptables rule......... i also want to share internet to my private network ....
Thanks with Warm regards
jitendra.sharma

kirukan 03-15-2013 11:12 PM

Google will be a good friend when you ask right questions..
http://www.cyberciti.biz/tips/linux-...-line-etc.html
try this link

jitendra.sharma 03-20-2013 12:16 AM

i solved with this Commands:-

#iptables -I INPUT -P all -j ACCEPT
#iptables -I OUTPUT -P all -j ACCEPT
#iptables -I FORWARD -P all -j ACCEPT
#iptables -t nat -I POSTROUTING -j MASQUERADE
#service iptables save


All times are GMT -5. The time now is 04:00 PM.