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'm running Ubuntu desktop 10.04 and on every boot the machine cannot be accessed from outside the LAN. after running sudo route add default gw 192.168.1.1 everything works as expected. Is there any way to make this happen on boot? I've tried adding a cron job but that didn't work. any ideas?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Add the above command to /etc/rc.local

 route add default gw 192.168.1.1

You need to remove sudo part since /etc/rc.local running as root. Anything added to this file will be executed after all other startup programs.

share|improve this answer
    
Thanks! I'll try that and report back. It may be a while since I'm away from the server and, because of this problem, am reluctant to restart it remotely. –  edc1591 Mar 31 '11 at 23:30
    
it worked! thanks –  edc1591 Apr 5 '11 at 16:31

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.