Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

share|improve this answer
1  
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

 
discard

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.