I am running Linux Mint 9
I play xbox live and run it through my laptops wireless network connection so i dont have to pay 100 dollars for the usb wireless adapter for the xbox. In windows 7 this is easy to configure so that when i turn my laptop on and then xbox it automatically connects. I wrote a program that enables ip forwarding it is written as follows
ifconfig eth0 up
ifconfig eth0 192.168.2.0
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.2.0/24 -j MASQUERADE
but when i run it as root nothing happens and my xbox wont connect to live. But when i manually type in these commands after su to root it works
also my startup file is rc.local as ive read an in it ive written the path to my program so it will be run how can i tell it is being run and how do i tell it to run as root?
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# By default this script does nothing.