LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-28-2009, 02:39 PM   #1
CoffeeKing!!!
Member
 
Registered: Mar 2008
Posts: 117

Rep: Reputation: Disabled
using the sbin/route command because I can't connect outside my router without it


I have a ubuntu server (set to static ip) at my home behind a normal residential gateway. I can ssh into it and ping the Res gw from it but, can't ping google successfully. After I enter sudo /sbin/route add -net 0.0.0.0 gw 0.0.0.0 eth0 I can. (The second set of zeros of course being my Res GW's ip.)

Is there anyway I can automate this or make it work properly?
 
Old 01-28-2009, 07:40 PM   #2
ne pas
Member
 
Registered: Jul 2008
Posts: 55

Rep: Reputation: 23
Just add the gateway option to the eth0 section in /etc/network/interfaces file, par example:
Code:
iface eth0 inet static
    address 192.168.1.24
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
 
Old 01-28-2009, 11:24 PM   #3
CoffeeKing!!!
Member
 
Registered: Mar 2008
Posts: 117

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ne pas View Post
Just add the gateway option to the eth0 section in /etc/network/interfaces file, par example:
Code:
iface eth0 inet static
    address 192.168.1.24
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
thanks
I'll try that as soon as I can.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default route took 20s to display with 'route' command Akhran Linux - Newbie 3 11-04-2006 04:59 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
Nothing happens when I run /sbin/route -n HyperSprite Linux - Networking 3 04-28-2004 04:20 PM
/sbin/route -n and defautl gateway shanenin Linux - Networking 1 02-05-2004 01:10 PM
Wrap up of the /sbin/route command acura94 Programming 1 09-11-2002 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration