network address translation an internet standard that enables a local-area network lan to use one set of ip addresses for internal traffic and a second set of addresses for external traffic a nat box located where the lan meets the internet makes all necessary ip address translations nat serves three main purposes provides a type of firewall by hiding internal ip addresses enables a company to use more internal ip addresses since they’re used internally only there there’s no possibility of conflict with ip addresses used by other companies and organizations allows a company to combine multiple isdn connections into a single internet connection.
Para configurar NAT en Centos 5 procedamos a editar el archivo /etc/rc.local y agreguemosle las siguientes lineas
iptables = /sbin/iptables
intranet = 192.168.10.0/24
inet = ppp0
lan = eth1
$iptables -t nat -a postrouting -o $inet -s $intranet -j masquerade
Una vez hecho lo anterior modifiquemos la siguiente linea en el archivo “/etc/sysctl.conf ” su valor por default es 0 cambiemos este a 1
net.ipv4.conf.default.forwarding=1
