[ubuntu-ar] Usar Ubuntu como gateway
Ariel Santana
arielsantana0 at gmail.com
Sat Apr 19 22:17:23 BST 2008
2008/4/19 Lucas Cardoso <lucasecardoso en gmail.com>:
>
>
> Gracias por lo del port forwarding! Por alguna misteriosa razón, yo YA lo
> había hecho eso, pero no estaba funcionando... hay alguna manera de
> activarlo por default? En el archivo /etc/sysctl.conf saqué el comment de la
> línea "net.ipv4.conf.default.forwarding=1", pero al rebootear seguía estando
> desactivado...
>
si tenés las reglas del iptables en un script, podés poner esa linea del
forwarding algún lugar de ese script.
#/bin/bash
#reglas
iptables -A INPUT -i eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to mi.ip.externo
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#forward
echo 1 > /proc/sys/net/ipv4/ip_forward
--
Ariel Santana
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: https://lists.ubuntu.com/archives/ubuntu-ar/attachments/20080419/4ce84bce/attachment.htm
More information about the Ubuntu-ar
mailing list