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

Controling the routing via PHP



Hi all!

I know a little of linux, bash scripting and networking.
I have a debian stable machine, with apache + php+mysql that provide a
webinterface written by me.
That machine would have no default routing and many gateway.
On the lan side, people can only connect to the server via the
webinterface and allow a certain computer to connect creating on the
fly the routing on the selected gateway.

I think that doing this by MAC address would do.
For now, I've made a simple bash script that I execute from PHP and it
would return me the mac address given the ip, otherwise after a
reasonable timeout return NONE which would tell me that the user is
not online.

I'm looking at iproute2 and of course netfilter, I'm not really sure
if I should use bash scripting or not, and in case, when I execute a
script from php the priviligies are as Apache, which is limited, and I
might need root priviligies, what should I do ?
Change apache priviligies, sudo the script, i'm really not sure.

thanks all for attention and i hope i'm on topic.

Lawrence



Reply to: