LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2014, 09:34 AM   #1
geeman75
LQ Newbie
 
Registered: Mar 2014
Posts: 4

Rep: Reputation: Disabled
can't access internet


Okay Linux newbie here. I set up a server with Ubuntu 12.04 LTS I’m going to use it as a fog server. It has lamp and samba. I have set an static IP address, but unable to access internet, and can’t ping IP address either. I have already tried network restart commands sudo and with out sudo. I'm not sure if that was the right track or not just need to get this up and running.
 
Old 04-02-2014, 11:44 AM   #2
vbarun2000
LQ Newbie
 
Registered: Apr 2014
Posts: 8

Rep: Reputation: Disabled
try to check where your name servers and gateway are correct in

/etc/resolve.conf
 
Old 04-02-2014, 12:14 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,167

Rep: Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889
please run this to provide the necessary diag info:
Code:
echo uname: && uname -a -m -p && echo lspci: && lspci && echo lsusb: && lsusb && echo lsmod: && lsmod && echo ifconfig: && ifconfig && echo ifconfig -a: && ifconfig -a && echo iwconfig: && iwconfig && echo resolv.conf: && cat /etc/resolv.conf && echo route: && route -n && echo ping router: && ping -c 1 `route | awk '/default/ {print $2}'` && echo ping dns-server: && ping -c 1 `awk '/nameserver/ {print $2}' /etc/resolv.conf | head -n 1` && echo ping using ip: && ping -c 1 64.235.229.141 && echo ping using dns: && ping -c 1 www.02144.com
 
Old 04-02-2014, 12:22 PM   #4
geeman75
LQ Newbie
 
Registered: Mar 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
I am attaching a shot of my ifconfig results to see if that helps to pin point problem.
Attached Thumbnails
Click image for larger version

Name:	CAM00119.jpg
Views:	9
Size:	260.5 KB
ID:	15143  
 
Old 04-02-2014, 12:38 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,167

Rep: Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889
i tried pinging that address but it just hangs.
 
Old 04-02-2014, 12:44 PM   #6
geeman75
LQ Newbie
 
Registered: Mar 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Angry

yeah that's the same problem I am having not sure what to do...
 
Old 04-02-2014, 02:47 PM   #7
geeman75
LQ Newbie
 
Registered: Mar 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
Does anyone know what I need to do to get it to stop hanging?
 
Old 04-03-2014, 12:43 AM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Have you tried dhclient eth0
 
Old 04-03-2014, 12:51 AM   #9
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

how did you configure your static IP? Did you edit your /etc/network/interfaces file? What did you set for gateway and netmask?

If you reinitialise that interface do (assuming you really are using /etc/network/interfaces):
Code:
sudo ifdown eth0
sudo ifup eth0
Evo2.
 
Old 04-03-2014, 12:52 AM   #10
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by EDDY1 View Post
Have you tried dhclient eth0
OP said thay are using static IP, not dhpc.
OP: can you confirm?

Evo2.
 
Old 04-03-2014, 03:51 AM   #11
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,273

Rep: Reputation: 587Reputation: 587Reputation: 587Reputation: 587Reputation: 587Reputation: 587
You must use ifconfig to see if the interface is configured. If the network interface has the IP you want, then it's configured. If you can't ping it, a firewall or router is probably blocking the ping. If you have no router between the machines, then you have to use a xover cable. Traceroute might help after you make sure the interface is configured. If you have a default DROP packet filter, you must specifically allow ICMP for ping to pass through.
 
Old 04-03-2014, 09:29 AM   #12
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,899
Blog Entries: 27

Rep: Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186
Member Response

Hi,

I'll add to what other members have suggested. From the 'ifconfig' your IP is assigned to ' Board of Regents of the University System of Georgia'. Do you have the kernel route table setup properly? From the 'cli' do a 'route -n';
Quote:
excerpt from 'man route';
route - show / manipulate the IP routing table

SYNOPSIS
route [-CFvnee]

route [-v] [-A family] add [-net|-host] target [netmask Nm] [gw Gw] [metric N] [mss M] [window W] [irtt I] [reject] [mod] [dyn] [reinstate] [[dev]
If]

route [-v] [-A family] del [-net|-host] target [gw Gw] [netmask Nm] [metric N] [[dev] If]

route [-V] [--version] [-h] [--help]

DESCRIPTION
Route manipulates the kernel's IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface after it
has been configured with the ifconfig(8) program.

When the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the routing
tables.
Sample route table;
Code:
route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    1      0        0 wlan0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
Notice in the above route table that the gateway is '192.168.1.1' for wlan0 with flags 'UG';
Quote:
Flags Possible; flags include
U (route is up)
H (target is a host)
G (use gateway)
R (reinstate route for dynamic routing)
D (dynamically installed by daemon or redirect)
M (modified from routing daemon or redirect)
A (installed by addrconf)
C (cache entry)
! (reject route)
Which means the route is up & to use the gateway address 192.168.1.1 for device wlan0.

Quote:
excerpt from 'man route';

route add default gw mango-gw
adds a default route (which will be used if no other route matches). All packets using this route will be gateway through "mango-gw".

The device which will actually be used for that route depends on how we can reach "mango-gw" - the static route to "mango-gw" will have to be set up before.
To setup your route table then do from the cli' as root:
Code:
 route add -net 168.30.166.27  netmask 255.255.255.0 dev eth0 

Please note the netmask, I suggest you look at: http://www.aelius.com/njh/subnet_sheet.html to setup proper mask if needed. 

Your University IT support admin should give you the correct mask if a change from 255.255.255.0 is necessary. 
I assume from the sample output  your mask is assigned by IT already.

then do;

route add default gw mango-gw
mango-gw would be the Georgia gateway IP assigned to you. You can then do a 'route -n' to show the kernel route table to make sure the gateway route is up (U) and that it is correctly assigned (G) flags.

If the eth device has been configured properly and with a valid IP then a valid 'route table a 'ping' to a known good IP should respond properly.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
vsftp - Can access FTP within office network BUT cant access via Internet! kokfei77 Red Hat 2 03-07-2012 08:24 PM
My dialup to my internet provider works but I don't have access to internet jsl06 Slackware - Installation 5 06-12-2011 02:16 PM
[SOLVED] PPPOE server access the internet clients fail to access the internet simbini Linux - Newbie 3 08-31-2010 01:37 AM
Debian Woody: Can't access internet through router, but can access network computers marales314 Linux - Networking 3 06-09-2006 01:33 PM
WIFI WLAN / Cannot access internet but can access the router configuration page?SUSE thomas939 Linux - Wireless Networking 12 12-13-2005 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:44 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration