Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the following simple solution for port forwarding:

sudo su
nohup redir --lport 80 --caddr --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?

share|improve this question

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

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

Then issue:

chmod +x /etc/rc.local

After reboot it should work

share|improve this answer
That won't run it as root tho. – Jason Apr 25 '13 at 23:17
Try and put it on root crontab – LnxSlck Apr 26 '13 at 9:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.