LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-09-2009, 08:26 AM   #1
hikerguy
LQ Newbie
 
Registered: Oct 2008
Posts: 20

Rep: Reputation: 1
Printer sharing between Linxu host and XP guest


I'm looking for a SIMPLE solution for printer sharing. I have an HP printer attached to my Linux host (prints fine from there). I want my XP box to be able to use this printer as well. I can ping my XP box from my Linux box (and vice versa), and the XP box has the HP print driver installed.

When I go into my XP box and try to add a printer, I click "A network printer or a printer attached to another computer", then "Connetc to a printer on the Internet or on a home office network" and enter my printer as follows:

http://192.168.2.16:631/printers/myprintername

Note: I'm using the printer name as show in CUPS.

I also tried it without port 631. Either way, I get an error message saying "Windows cannot connect to the printer. Either the printer name was typed incorrectly or the specified printer has lost its connection to the server.

Thanks,

Andy
 
Old 01-09-2009, 09:38 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
What you have there looks good to me. I have several windoze systems using my Brother printer on my linux systems. This is how I set them up.

Two things I can think of, firewalls on either linux or windoze?

Hosts.allow hosts.deny files can also block network communications. They are usually in your /etc directory.
 
Old 01-09-2009, 10:07 AM   #3
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
I would firewall port 631 closed to outside. Turn off the linux firewall if there is one and try printing again. Best thing is buy an ethernet to USB print server.

Brian
 
Old 01-09-2009, 01:27 PM   #4
hikerguy
LQ Newbie
 
Registered: Oct 2008
Posts: 20

Original Poster
Rep: Reputation: 1
Brian, can you explain a little more about what you meant by "I would firewall port 631 closed to outside." Not sure I follow you there. I know port 631 is for IPP, but wasn't clear on what you're suggesting.

I will disable the FW tonight and post the results here.

Thanks,

Andy
 
Old 01-09-2009, 08:20 PM   #5
hikerguy
LQ Newbie
 
Registered: Oct 2008
Posts: 20

Original Poster
Rep: Reputation: 1
Well, the FW was definitely part of the issue. I flushed it out (sudo iptables -F), then rebuilt it only allowing TCP, UDP and my local network out. After doing that, I was able to add the printer. I then reverted to my old iptables and rearranged one line (in the OUTPUT section below, I swapped the two OUTPUT statements, so that first it would allow all NEW traffic from the 192.168.2.0/24 network, then all RELATED,ESTABLISHED. After doing that, I could still add my printer. HOWEVER, now every time I try to print something from Notepad (as a test), the application hangs and an error message pops up saying "Notepad has encountered a problem and needs to close....". I tried this on both my virtual XP box (running in Virtual Box), as well as standalone desktop running just XP. Any thoughts as to why it's generating this message when trying to print?

Quote:
:OUTBOUND - [0:0]
-A INPUT -i l0 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -m state --state NEW -j ACCEPT
-A INPUT -j DROP
-A OUTPUT -s 192.168.2.0/24 -m state --state NEW -j ACCEPT
-A OUTPUT -s 192.168.2.0/24 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -j DROP
Thanks,

Andy
 
Old 01-10-2009, 09:06 AM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Glad to see you have it working Andy.

Brian
 
  


Reply

Tags
network, printing, share



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
Ftp between Guest and Host using proftpd lindylex Linux - Networking 0 11-21-2008 10:13 AM
cannot connect Host to Guest OS (vmware) ic_torres Linux - Networking 2 10-23-2007 04:53 AM
network between the host and guest in VMWare gongcon Linux - Networking 1 03-08-2005 09:25 PM
sharing internet connection between Fedora host and Win98 VMware guest NGShake Linux - Software 2 12-20-2003 12:13 PM
VMware Linux guest on 2K host. seriaalportx Linux - Newbie 1 11-19-2002 07:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:31 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
Open Source Consulting | Domain Registration