Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

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.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

I tried both 10.0.1.4 and 127.0.0.1 and the Mac still won't print to the printer on the linux machine. then I went to https://www.grc.com/x/ne.dll?bh0bkyd2 and got 24.26.199.175 as my public IP Address. It didn't work either. If I'm using the wrong string of numbers, then which one should I use?

The only other reason I can think of that this doesn't work is that port 631 isn't open in the firewall.

This is a crucial question. If it is inside the firewall, which probably means it is in the same building, then the right IP address is the 10.0.1.4. (Never use 127.0.0.1 to go from one machine to another.)

If it is outside the firewall, then the packets have to travel across the internet, so you must use your external IP address, 24.26.199.175. (BTW, you could have also found this at http://jackson.io/ip/.)

But for an external connection there is one more very important step. You have to log into your router and configure it to forward port 631 to local IP address 10.0.1.4.

If you think you have everything setup correct and you just can't figure out where the packets are getting lost, you could install and run wireshark (formerly ethereal). It's a very powerful (but not simple) tool to detect what network traffic is doing.

I am a newbie at Linux, but I do know quite a bit about networks and IPs.

127.0.0.1 is the address any machine uses to refer to itself, so this is never a good choice.

24.26.199.175 is your address on the internet, your other local machines might see this as your linux machine... but if they did, they would go through the internet first to get to it, rather than through your network, and most print sharing I've seen over the net doesn't work very well.

That being said, the first "inet address" SHOULD be the one you're using. However, the address that's being used 10.0.1.4 I find to be a little odd. This can be used for local addressing, but isn't the usual choice. What are the IP addresses of your other machines?

All of your machines may have a local IP of 192.168.0.x where x can pretty much be any number 1-255.

Either way, they should all begin with 10.0, or all begin with 192.168 (or 172.16 is another option). If you have one computer or set that's 10.0 and the rest 192.168 or something else, they won't as easily talk to eachother.

Other sets of numbers will work, but those are the ones least likely to give you trouble.

Are you using DHCP? Usually that will automatically set you up with IPs that work.

I now have the correct IP address! Thank you! ... still won't work :-/

I checked the IPs on my other machines and they are all 10.0.1.x with x being a number 1-5. However, when I put 10.0.1.4 in as the location of my printer and tried to print, either of two things happened, with no apparent pattern as to which one occured when:

1. The operation times out in the "connecting to printer on port 631" phase OR

2. The print jobs arbitrarily stop

Just out of curiosity, I got in the terminal in one of the macs and signed in to the linux box using SSH, so I know there's no problem with the IP address. I also turned off the firewall on the linux box to see if it was interfering with the printer connection and no such luck. So thanks for the comments, but I appear to be back at square one anyway.

Just one curiosity question, though. If the 127.0.0.1 isn't used in the local network, and it isn't used for the internet, then what is it good for?

Just one curiosity question, though. If the 127.0.0.1 isn't used in the local network, and it isn't used for the internet, then what is it good for?

Well, one thing it's good for is checking on your printers. Cups is administered via a web interface with at http://localhost:631/. The name localhost is resolved by reading 127.0.0.1 from your /etc/hosts file. Cups is actually running a little webserver that only works on the computer it is run on.

If you are running a real web server, ftp server, or other server, you can usually access it and test it the same way by selecting the right port or letting it go to the default.

As for your printer problem, that http://localhost:631/ link would be a good place to search for answers, both to actually manage the print queue and to read the documentation.