Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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)
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.