Hi.
I'm currently working on a script that would allow me change firewall rules on a box from a laptop. First of all, i'll describe the system.
|ŻŻŻŻŻŻ| |ŻŻŻŻŻŻŻŻŻŻ|
|Laptop |--------| Linux Box |-----------SERVER
|______| |__________|
The linux box is a multimedia device wich as 2 network cards. One allows to connect a laptop to the Linux Box and the other one allow the Linux Box to connect to the server.
Right now, I can navigate on my linux box and use a web page to communicate with the server and activate my script that change my firewall rules and allow the laptop to connect to the internet.
Now, when I connect the laptop and the firewall rules are not changed, it pops me a webpages asking to active the connection. However, I need the server to register that transaction. So the Linux Box gets the information via a php script, and push me a webpages containing the information.
I'm now trying to active the firewall rules from the LAPTOP. I use a PHP script wich calls a script on the server. In a perfect world, the server connects to the box via ssh and activate the script.
Now, i've made a small SH script :
***********************************************
#!/bin/sh
#This script is used to enable firewall rules on the STB
#to allow a laptop connection over the internet.
UNIT="0"
CMD="0"
if [ "$#" -eq "0" ]; then
echo "Need at least 1 argument"
exit
fi
if [ "$#" -ge "1" ]; then
UNIT=$1
fi
if [ "$#" -ge "2" ]; then
CMD="ENABLE"
fi
echo "UNIT is set to : $UNIT"
echo "CMD is set to : $CMD"
ssh -l root $UNIT /opt/irg/api/os/irg-ip_gw.sh $CMD
echo "Firewall is open"
************************************************
If i'm on the server, and execute the script with the command line, NO problem. The ports open, joy follow, i'm happy, my dog too, alleuia... However, if it's the webpage from the LinuxBox that does it, it's not working. The script executes, because the echo appears on my webpages that's constructed via php but it's look likes it just jumps the ssh line ....
Here are the permission on my script : -rwxr-xr-x 1 root root 425 Sep 2 13:44 irg-ip_gw.sh
I'm pretty sure it's a permission issue but I cant really figure how to fix it. I would qualify myself as an advanced

and learning linux on a daily basis now. Any help would be appreciated.
Thx.
Phil.