Hi,
I made a new script file in "/etc/init.d" by the filename
rc.ipmasq with the following script in it -
#!/bin/sh
IPTABLES=/sbin/iptables
$IPTABLES -F -t nat
$IPTABLES -A POSTROUTING -t nat -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
-----
After this i ran the "insserv rc.ipmasq" command which gave no
errors but still NAT wont work, it shows no output in the command
"iptables -L -t nat" either. however it gives me this error msg
when i type this command:-
linux:~ # /etc/init.d/rc.ipmasq
/etc/init.d/rc.ipmasq: line 2: IPTABLES: command not found
/etc/init.d/rc.ipmasq: line 3: -F: command not found
/etc/init.d/rc.ipmasq: line 4: -A: command not found
I am unable to understand, why it wont accept this code.
Amit Ash.
----- Original Message -----
From: "Peter Albrecht" <peter.albrecht@novell.com>
To: <squid-users@squid-cache.org>
Sent: Wednesday, January 25, 2006 8:31 AM
Subject: Re: [squid-users] NAT on suse linux 10.0
>Hi Amit,
>
> > I have just installed and configured Squid proxy service on
>Suse
> > Linux 10.0. It is working fine but I also need to configure
>NAT
> > so
> > that my users can download their emails in Outlook. To
>achieve
> > that I have added these lines in the "/etc/sysctl.conf"
> >
> > net.ipv4.ip_forward=1
> > iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
> > iptables -I FORWARD -i eth1 -o eth0 -j ACCEPT
>
>The last two lines will not work. /etc/sysctl.conf does not
>understand this
>syntax (only the first of the lines you listed). Put the iptables
>rules in a
>separate script in /etc/init.d/ and create the symbolic links in
>the
>corresponding runlevel directories using insserv. A template for
>the script
>is /etc/init.d/skeleton.
>
> > But still the NAT doesnt work on this server. Please direct
>me
> > and thanks in advance.
>
>Check the settings for the NAT table using
>
>iptables -L -t nat
>
>Just "iptables -L" will not show your NAT settings.
>
>Regards,
>
>Peter
>
>--
>Peter Albrecht, Novell Training Services,
>peter.albrecht@novell.com
>
>
Received on Wed Jan 25 2006 - 21:33:27 MST
This archive was generated by hypermail pre-2.1.9 : Wed Feb 01 2006 - 12:00:01 MST