I am trying to run the below command to run automatically on startup
upnpc -a `ifconfig eth0 | grep "inet addr" | cut -d : -f 2 | cut -d " " -f 1` 80 5900 TCP
I have added this command in
/home/pi/.config/lxsession/LXDE-pi/autostart as I wanted it to run for the user pi only.
but it is not working, as I can see the port forward doesnt appear in router page virtual servers , however if I run the above command manually from the shell of pi , it works and forwarded port appears in router page.
I followed this discussion regarding where to put.