[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables does not run from script



On Mon, Jul 02, 2001 at 06:50:56PM +0200, HGS: Buchleitner Martin wrote:
> Hi again !
> 
> i am using a script by boot-up do set up iptables-ruleset.
> but this script does not work, because i get the error message
> that e.g. iptables can not find the maquerading-library at
> /usr/local/lib/iptables/
> 
> but when i set up e.g. masquerading out from shell by 
> 
> iptables -t nat -A POSTROUTING -o ppp0 -s 10.0.1.0/24 -j MASQUERADE
> 
> it works fine.
> 
> may somebody help me ?
> i re-installed iptables and also the kernel with no effect

Your /lib/ld-linux.so doesn't know where the libs are.  You will
need to do one of the following:

o  add /usr/local/lib/iptables to /etc/ld.so.conf; or
o  add "LD_LIBRARY_PATH=/usr/local/lib/iptables" to the top of
the script; or
o  move the libs to /lib or /usr/lib (or somewhere else searched
by ld.so); or
o  relink iptables, using the -rpath flag to tell it where the
libs are.

After doing one of the above, you can add this to your script to
see what libraries it can and can't find and where it finds
them (if it does):

ldd /path/to/iptables
(e.g. ldd /sbin/iptables)

If the above doesn't work, make sure the partition containing
/usr/local/lib/iptables is mounted when your script runs :)

I hope this helps.

-- 
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: