Monday, June 15, 2009

To Forwarding /NATing using iptables

iptables file configuration /etc/sysconfig/iptables,


To forwarding /NATing :

Assuming external internet card is eth0, and external IP is 123.12.23.43 and the internal network card is eth1, then:

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to x.x.x.x

to allow port webmin xs

iptables -A INPUT --protocol tcp --dport 10000 -j ACCEPT



Last step for Fedora/RHEL users. In order for your system to save the
iptables rules we setup in step two you have to configure itpables
correctly. You will need to edit /etc/sysconfig/iptables-config
and make sure IPTABLES_MODULES_UNLOAD,
IPTABLES_SAVE_ON_STOP, and
IPTABLES_SAVE_ON_RESTART are all set to 'yes'.


sources : http://tldp.org/HOWTO/html_single/Masquerading-Simple-HOWTO/

0 comments:

Post a Comment | Feed

Post a Comment



 

OSS R&D Copyright © 2009 Premium Blogger Dashboard Designed by SAER