Allen Kistler wrote:
>
> Carles Arjona wrote:
> > Roland Krismer wrote:
> >
> > <>
> >
> >>The two commands:
> >>modprobe ipt_MASQUERADE
> >>iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.0/16 -j MASQUERADE
> >>
> >>Now, my question is where (in which file) to save these commands in order to
> >>enable them when I start my Internet connection.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > On RedHat Linux such commands are usually called from the
> > /etc/ppp/ip-up.local script using absolute pathnames:
> >
> > [snip]
>
> On RedHat such commands are put in /etc/sysconfig/iptables as something
> like ...
>
<snip>
Or just run
iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.0/16 -j MASQUERADE
iptables-save > /etc/sysconfig/iptables
Then make sure to disable iptables by means of chkconfig, ntsysv, .. if
you don't want masquerading active at boot time.
The /etc/ppp/ip-up.local script must contain:
/sbin/service iptables start
Which is a different approach to enable Masquerading with iptables after
starting the PPP link.
PS: The /etc/ppp/ip-down.local script must also be modiffied to disable
IP masquerading.
--
Regards,
Carles Arjona
(E-Mail Removed) ( nospammer IS my real username ).