0

I use the following simple solution for port forwarding:

sudo su
nohup redir --lport 80 --caddr 192.168.1.2 --cport 80 &

It works this way and doesn't work any other (like sudo nohup... for example).

I'd like this to be done automatically at my Ubuntu 12.04 Server start-up.

Where can I put this?

1 Answer 1

2

Edit the file /etc/rc.local and put:

nohup redir --lport 80 --caddr 192.168.1.2 --cport 80 &

Then issue:

chmod +x /etc/rc.local

After reboot it should work

2
  • 1
    That won't run it as root tho.
    – Jason
    Apr 25, 2013 at 23:17
  • Try and put it on root crontab
    – LnxSlck
    Apr 26, 2013 at 9:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .