LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 11-25-2004, 02:21 AM   #1
shinycisco
LQ Newbie
 
Registered: Aug 2003
Location: California
Distribution: Suse, Ubuntu, PCLinuxOS
Posts: 28

Rep: Reputation: 15
Unhappy People cant ping me




Issue#1 - People cant seem to be able to ping my ip address while I'm running linux.

Here's my setup:
- RH9
- router

Here's my troubleshooting so far:
- I can ping ppl and various site
- ppl can ping various sites but not my ip while I'm running linux (I didnt try with XP)

Issue#2 - I dont know how to view my ip address through linux (I was able to view my ip address through a website). Do I need to enter the address using the 'network' linux utility so that the pc can then recognize it?

Thanks in advance, any ideas would be appreciated.

Cisco
 
Old 11-25-2004, 02:38 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
?

Can you access the internet from Linux? If so, then go to www.whatismyip.com If not, then your problem is a bit different than it is presented here.

As for pinging, what's the point? Can you be a bit more specific, maybe your router denies ICMP packets unless otherwise configured... Maybe your firewall drops them, check if you've got IPTables running.

Cool
 
Old 11-25-2004, 02:42 AM   #3
ferovac
LQ Newbie
 
Registered: Nov 2004
Location: Zagreb, Croatia
Distribution: Fedora Core 3 for 64bit processors
Posts: 7

Rep: Reputation: 0
to view your IP address you might want to open terminal (right click somewhere on the desktop -> open terminal) and type:
Code:
        ip addr sh
you should be able to see all network interfaces along with their IP addresses.
about your 1st question, try these in the terminal:
Code:
        modprobe pcnet32 
        ip link set eth0 up
        ip addr add 10.0.0.1/24 dev eth0
if you aren't connecting to a network via ethernet then change eth0 to your device.
 
Old 11-25-2004, 10:06 AM   #4
dublinclontarf
Member
 
Registered: Jan 2004
Location: dublin ireland
Distribution: Ubuntu PPC
Posts: 39

Rep: Reputation: 15
alternatively to find information about your ip and network connection in general type
"ifconfig"
that should spit out a good bit of information, from this you should be able to see your ip address and you subnet.
(this is in a console/terminal that you do this)
 
Old 11-25-2004, 03:31 PM   #5
shinycisco
LQ Newbie
 
Registered: Aug 2003
Location: California
Distribution: Suse, Ubuntu, PCLinuxOS
Posts: 28

Original Poster
Rep: Reputation: 15
OK...

dublinclontarf -

I type "ifconfig" in the console/terminal but I get "bash: ifconfig: command not found"

ferovac -

I tried typing both "ip addr sh" and "modprobe pcnet32" in the terminal but I got the same error as above (bash: [command]: command not found).

Regarding your last comment "if you aren't connecting to a network via ethernet then change eth0 to your device.", I think it may have something to do with the problem.

how do I know how I'm connecting to the internet? and if not through ethernet, then how do I change it to eth0?

MasterC -

I can access the internet and that's the website that I was referring to in my original msg.

As for your last part of the post, "maybe your router denies ICMP packets unless otherwise configured... Maybe your firewall drops them, check if you've got IPTables running":
- I havent set the router to deny ICMP packets
- I'm reading on IPTables and trying to find out if this is part of the problem.

Thanks everyone!
Cisco
 
Old 11-25-2004, 08:37 PM   #6
Stomatella
LQ Newbie
 
Registered: Dec 2002
Location: US
Distribution: FC5
Posts: 22

Rep: Reputation: 15
I might misunderstand your question, but here goes anyway:

Most routers--out of the box--will NOT respond to a ping from the Internet, and it is your router that will hear the ping, not your Linux box.

You actually have several IPs: Your WAN IP, i.e., the one you get from your ISP, and your LAN IP, the one you get from your router.

While there are various methods of getting your ip on Linux, they will respond with your LOCAL ip, i.e., 192.168.X.X. They also generally need to be run as root. "Ifconfig" won't be found in the path on a RH build unless you are root: and I mean REALLY root, i.e. you are not just sudoing. Also, if you have become root by running su at the command line, you need the switch - to make sure you BECOME root instead of just taking on root's privileges (if you type su<enter> instead of su -<enter> you will not have root's path, and commands like ifconfig will not be found.) This may also be the case with your modprobe issue: it is not being found in your path.

Anyway, you need to know this internal address, and you need to make sure that your router always assigns that address to your Linux box (statically works better than DHCP in this case.) You can ping that address only from other boxes on the same router, *but not from outside the firewall.* The router won't know which local client should receive a ping if it comes in from outside.

To the rest of the world, your IP is something else entirely and can be discovered by using your router's administration app (usually these are Web-based, read your manual.) This is usually referred to as your WAN IP. You can ping this, but as I mentioned most routers don't respond by default as a security measure.

As you probably know, so that your Linux box will receive requests from the Internet, you need to enable port forwarding. I'd do this conservatively, just forwarding port 80 for a Web server or whatever.

I hope this helps!

Rob
 
Old 11-26-2004, 06:37 AM   #7
shmonkey
Member
 
Registered: Nov 2004
Location: UK
Distribution: Ubuntu
Posts: 118

Rep: Reputation: 15
for ifconfig to work you must be root

Regards

Shmonkey
 
Old 02-05-2005, 02:56 PM   #8
shinycisco
LQ Newbie
 
Registered: Aug 2003
Location: California
Distribution: Suse, Ubuntu, PCLinuxOS
Posts: 28

Original Poster
Rep: Reputation: 15
thanks everyone for the assistance! it really helped
 
Old 02-05-2005, 02:59 PM   #9
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,276

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You don't need to be root for ifconfig to work, it's just not in the path of a normal user by defaulyt. But if you type the full path to the command, /sbin/ifconfig it will work fine as a normal user. obviously, though, you need to be root to change the IP address and network settings.
 
  


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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 03:39 PM
How can I get people to use Linux? I'm bad at converting people over. Mr. Hill Linux - Newbie 31 10-19-2008 10:16 AM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 10:10 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 05:57 AM
I can ping google.com successfully,but ping client(in my intranet) failed.Why? whepin Linux - Newbie 4 12-30-2001 05:54 AM


All times are GMT -5. The time now is 10:48 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