Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Misc
Reload this Page Limit Network Printer Access
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Misc Any questions or Linux discussion that does not fit in any of the other technical areas.

Reply
 
Thread Tools Display Modes
Old 01-18-2008   #1 (permalink)
Cabhan
Linux Guru
 
Cabhan's Avatar
 
Join Date: Jan 2005
Location: Seattle, WA, USA
Posts: 2,409
Limit Network Printer Access

Howdy all. I have an issue with my printer setup that I'd like to have some suggestions are.

I attend a school where they give us only one Ethernet port per student. However, I have two computers. So I am using an Ethernet hub, with my Linux desktop, MacBook Pro, and HP printer plugged into it. In this way, everybody gets Internet access, and both of my machines can see my printer.

The problem now is that because the printer is on the network, anybody can print to it. And for some reason, people like printing 500 pages and using up all of my paper.

Now, the way I see it, there are two possibilities (and I don't know how to do either):

1) Leave the printer plugged into the Ethernet hub and somehow limit access
2) Plug the printer into my Linux box and somehow share it with my laptop

Does anyone know how to accomplish either of these, or some other process?

Many thanks.
__________________
DISTRO=Gentoo
Registered Linux User #388732
Gentoo Linux, 410 GB HD, 1.2 GB RAM, Fluxbox, These are a Few of my Favorite Things
Cabhan is offline   Reply With Quote
Old 01-18-2008   #2 (permalink)
anomie
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,699
Quote:
Originally Posted by Cabhan
So I am using an Ethernet hub, with my Linux desktop, MacBook Pro, and HP printer plugged into it. In this way, everybody gets Internet access, and both of my machines can see my printer.
If I'm understanding you correctly, this arrangement (i.e. hub uplink port to the school ethernet) gives you three University-routable IP addresses.

A quick and easy solution would be to spring for a router/NAT device. This device would then have the only externally facing NIC, with a second, internally facing NIC and a dhcp server so that you're on your own little private LAN.

Another solution would be to plug the printer into the Linux box (usb?) and then install cups on it to share with your Macbook. Installing and configuring cups is pretty trivial on CentOS (depending on your printer). I've never tried on Gentoo, but I figure with their extensive documentation it should be a snap. Once cups is installed you can control access to it at the application level (there are cupsd.conf directives) or even using iptables or tcp wrappers.
__________________
FreeBSD Handbook & FAQ // CentOS wiki
anomie is offline   Reply With Quote
Old 01-18-2008   #3 (permalink)
Cabhan
Linux Guru
 
Cabhan's Avatar
 
Join Date: Jan 2005
Location: Seattle, WA, USA
Posts: 2,409
I considered the router solution, but I really don't want to buy one.

However, you were right about the sharing via CUPS. I need to pick up a USB cable, but once I do, I should be able to get that working easily. Gentoo has some documentation on it. I feel a little silly for not checking there first .

Thanks!
__________________
DISTRO=Gentoo
Registered Linux User #388732
Gentoo Linux, 410 GB HD, 1.2 GB RAM, Fluxbox, These are a Few of my Favorite Things
Cabhan is offline   Reply With Quote
Old 01-24-2008   #4 (permalink)
Cabhan
Linux Guru
 
Cabhan's Avatar
 
Join Date: Jan 2005
Location: Seattle, WA, USA
Posts: 2,409
So it's time for some new snags.

I have changed my setup such that my printer is connected via USB to my Linux box. My laptop is setup, and can view the printer over the Internet (and even getting that far was an extraordinary pain).

The printer works under Linux. On my laptop, I can go to the web interface of my desktop and print a test page. So it would seem to be working.

It is not.

Whenever I try to print from my laptop, I get an error. In my error log, I see lines such as:
Code:
"POST /printers/Dorm_Printer HTTP/1.1" 200 24071 Print-Job server-error-not-accepting-jobs
Now, the printer is definitely accepting jobs. So something must not be setup correctly.

The printer is connecting to:
ipp://MY_IP:631/printers/HP_Deskjet_6980_series_USB_1
and this is certainly the correct queue and IP.

Any ideas? I'm rather stuck at this point.
__________________
DISTRO=Gentoo
Registered Linux User #388732
Gentoo Linux, 410 GB HD, 1.2 GB RAM, Fluxbox, These are a Few of my Favorite Things
Cabhan is offline   Reply With Quote
Old 01-24-2008   #5 (permalink)
coopstah13
Linux Enthusiast
 
coopstah13's Avatar
 
Join Date: Nov 2007
Location: MA, USA
Posts: 593
I know at my college I went to (WPI btw!!) didn't allow the usage of routers, but if you don't want to buy one you could still configure your gentoo box to do routing through iptables
coopstah13 is offline   Reply With Quote
Old 01-25-2008   #6 (permalink)
anomie
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,699
Quote:
Originally Posted by Cabhan
The printer is connecting to:
ipp://MY_IP:631/printers/HP_Deskjet_6980_series_USB_1
and this is certainly the correct queue and IP.
You can print from the cups server (gentoo box), right? e.g. lp some-file

Is that ipp:// URI what you entered into your Macbook?

I have the same setup at home as you (Macbook printing over ipp to a CentOS cups server). Remember to poke holes in the gentoo packet filtering rules for tcp/udp 631.
__________________
FreeBSD Handbook & FAQ // CentOS wiki
anomie is offline   Reply With Quote
Old 01-25-2008   #7 (permalink)
Cabhan
Linux Guru
 
Cabhan's Avatar
 
Join Date: Jan 2005
Location: Seattle, WA, USA
Posts: 2,409
Yes. I can print locally from the Linux box. The problem is only with connecting from my MacBook.

And yes, I have my MacBook connecting to that ipp:// URI.

I'm not too experienced with network stuffs, so maybe I'm a bit confused here. I don't even have iptables installed, so I'm not sure how I'm supposed to open up that port (rather, how do I know that it's even blocked? I can connect through HTTP over port 631).

Thanks though. This might actually work!
__________________
DISTRO=Gentoo
Registered Linux User #388732
Gentoo Linux, 410 GB HD, 1.2 GB RAM, Fluxbox, These are a Few of my Favorite Things
Cabhan is offline   Reply With Quote
Old 01-25-2008   #8 (permalink)
anomie
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,699
Quote:
Originally Posted by Cabhan
rather, how do I know that it's even blocked? I can connect through HTTP over port 631
That's our answer then (I see you mentioned it earlier). This means tcp 631 on your Linux box is open to your Macbook.

FWIW, another quick way to test from your Macbook is:
$ nc -z linux.box.ip 631 && echo 'Port is open!'

That will echo the message only if tcp 631 is open to the Macbook.

-------------------------

Anyway, can you change the directive to LogLevel debug in your cupsd.conf? You'll need to restart cupsd afterwards.

Then tail your error_log while trying to print from the Macbook. As you've noticed, cups is complex and sometimes difficult to troubleshoot. Hopefully that will provide some good clues.
__________________
FreeBSD Handbook & FAQ // CentOS wiki
anomie is offline   Reply With Quote
Old 01-28-2008   #9 (permalink)
Cabhan
Linux Guru
 
Cabhan's Avatar
 
Join Date: Jan 2005
Location: Seattle, WA, USA
Posts: 2,409
And, naturally, the Linux side was set up perfectly fine. The problem ended up being with the MacBook Pro.

Basically, the Mac OS X System Preferences don't set up printers properly (they use ipp://IP/queue/QUEUE; CUPS uses ipp://IP/printers/QUEUE). I then tried using lpadmin from the commandline, and that seemed to add the printer correctly, but the problem was on the Mac OS X side, with the printer not accepting jobs on the Mac OS X side. When I tried to enable jobs, it patched me through to my Linux box (as it recognized it as a remote printer), but there I got Permission Denied (as I should have).

I finally went through the CUPS admin panel (cPanelŽ, just like in Linux), and added it from there, and found great success.

Thanks for your help, all!
__________________
DISTRO=Gentoo
Registered Linux User #388732
Gentoo Linux, 410 GB HD, 1.2 GB RAM, Fluxbox, These are a Few of my Favorite Things
Cabhan is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
My Linux image doesnt access the network nabilchampion Installation 1 11-21-2007 10:48 AM
New installation can't access network (Realtek RTL-8029(AS)) paulspencer SuSE Linux Help 0 10-27-2006 10:54 AM
HP officeJet network printer help samuk81 Redhat / Fedora Linux Help 4 03-09-2006 02:55 AM
Fileserver with Samba and Printserver with CUPS Howto AlexK Linux Tutorials, HOWTO's & Reference Material 2 02-05-2006 04:42 AM
how to set up a network printer (the printer's ip address is 192.168.0.10 ) compilercradle Redhat / Fedora Linux Help 1 08-14-2005 01:49 PM




All times are GMT. The time now is 09:20 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0