|
||||||||||
Am Mittwoch, den 17.08.2005, 13:26 +0200 schrieb Daniel Heise: > I'm sorry Peter but things didn't change! OK. Here comes the solution: Problem lies here: <shellcmd>/bin/echo "@6 pass out quick on rl0 from any to any keep state" | /sbin/ipf -f -</shellcmd> <shellcmd>/bin/echo "map rl0 192.168.0.0/24 -> 0.0.0.0/32" | /sbin/ipnat -f -</shellcmd> The code inside of <shellcmd> </shellcmd> is executed by php with an exec(). I believe (read: I'm not really sure) that the pipe isn't evaluated so that the code fails. Solution: don't use pipes: <shellcmd>/bin/echo '@6 pass out quick on rl0 from any to any keep state' > /tmp/ipf.txt</shellcmd> <shellcmd>/sbin/ipf -f /tmp/ipf.txt</shellcmd> <shellcmd>/bin/echo 'map rl0 192.168.0.0/24 -> 0.0.0.0/32' > /tmp/ipnat.txt</shellcmd> <shellcmd>/sbin/ipnat -f /tmp/ipnat.txt</shellcmd> Ciao ... ... PIT ... --------------------------------------------------------------------------- copyleft(c) by | _-_ "sic transit discus mundi" (From the System Peter Allgeyer | 0(o_o)0 Administrator's Guide, by Lars Wirzenius) ---------------oOO--(_)--OOo----------------------------------------------- |