Re: iptables does not run from script
On Tue, Jul 03, 2001 at 01:50:51PM +0200, HGS: Buchleitner Martin wrote:
> ok - i tried all 4 solutions, but nothing changed
>
> i forgot to post the error message i get:
> -------------------------------------------------
> iptables v1.2.2: Couldn't load target
> `MASDQUERADE':/usr/local/lib/iptables/libipt_MASDQUERADE.so: cannot open
> shared object file: No such file or directory
You've got a typo in MASQUERADE.
> Try `iptables -h' or 'iptables --help' for more information.
> -------------------------------------------------
>
> the minimized script:
> -------------------------------------------------
> #!/bin/sh
> LOGFILE="/var/log/firewall"
> LOCAL="eth1"
> EXTERN="ppp0"
>
> LAN="10.0.1.0/24"
> LAN_ADSL="10.0.0.0/24"
>
> IPADDRESS=$(/sbin/ifconfig | grep P-t-p | cut -c 21-35 )
>
> echo IP $IPADDRESS >> $LOGFILE
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> iptables -t nat -A POSTROUTING -o $EXTERN -s §LAN -j MASQUERADE
This should be "$LAN" not "§LAN"
>
> exit 0
> --------------------------------------------------
[snip]
--
Michael Wood | Tel: +27 21 762 0276 | http://www.kingsley.co.za/
wood@kingsley.co.za | Fax: +27 21 761 9930 | Kingsley Technologies
Reply to: