Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91420 - cupsd ipp port 631 open to the www
Summary: cupsd ipp port 631 open to the www
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Printing HOWTO (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL: https://grc.com/x/ne.dll?bh0bkyd2
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-04 05:40 UTC by adr
Modified: 2005-06-28 03:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adr 2005-05-04 05:40:06 UTC
I followed the instructions in the "Gentoo Printing Guide" to get CUPS working on a standalone pc some weeks ago. Now, after doing a port scan, I found out that port 631 is open to internet (check ShieldsUP URL above). Does this mean that it's free printing at my place ;-(  or even worse?

If so, I think the manual should provide some info to warn for this, or a solution to block port 631 for the rest of the world. The "Gentoo Linux Security Guide" doesn't say anything about CUPS, and that installing a firewall may not be needed...

Reproducible: Always
Steps to Reproduce:
1. # /etc/init.d/cupsd start
2. scan port 631 (without firewall)
3. 
Actual Results:  
According to the CUPS access logs, no bad things happened... 
:-) 

Expected Results:  
 

No firewall installed yet.
Comment 1 Jonathan Smith (RETIRED) gentoo-dev 2005-05-04 05:49:25 UTC
this is actually desired behaviour so you can do work remotely.

it is expected that if anyone installs programs which primarily rely on networks for administration, they understand that it is open to the world. if you were to try to do anything, though, note that it requires a root password

a line or two in the guide with a link to a iptables page might be a good idea though...
Comment 2 SpanKY gentoo-dev 2005-05-04 06:46:50 UTC
default setup listens on all interfaces but doesnt allow anything to be changed except for if you connect via localhost ... all other interfaces will be denied

we should just update default cupsd.conf with a 'Listen 127.0.0.1' imho

printing team: what do you think ?
Comment 3 adr 2005-05-07 22:44:31 UTC
Thanks for the tips.

Tried adding Listen 127.0.0.1, but then I get:
cupsd: Child exited with status 98;
error_log: StartListening: Unable to bind socket - Address already in use.

Got iptables running now, but that's a lot of work! :)
Comment 4 D J Capelis 2005-05-10 15:46:40 UTC
Near or around line 428 is a line which states 'Port 631'

To get more secure behavior of only allowing connections on the localhost, comment this out and add a line below which states 'Listen 127.0.0.1:631'

Done.

If this was done by default it would save me the trouble of manually integrating my changes everytime cupsd.conf is updated...

Seems like the desired behavior most of the time.

IMHO the severity of this bug needs to be lowered.
Comment 5 adr 2005-05-10 22:55:03 UTC
Last solution works.
Comment 6 Chris Smith 2005-05-22 08:06:55 UTC
This is expected behavior for cups, not a critical bug. It's normal behavior
when cups is manually compiled and also with every other distro I've used.
The package is, after all, in the "net"-print group, and "net" services tend to
operate this way.
A user should always be cautious when starting any such service with an open
connection to the net.
Comment 7 Sven Vermeulen (RETIRED) gentoo-dev 2005-05-23 09:57:12 UTC
I've added a paragraph on Port -> Listen for systems that are immediately
connected to the Internet
Comment 8 Sven Vermeulen (RETIRED) gentoo-dev 2005-06-28 03:03:11 UTC
The rewrite (see http://www.gentoo.org/doc/en/handbook/draft/printing-howto.xml)
does not have this paragraph anymore as it is no security issue. You can not
print to the printer anyway unless you explicitly allow it in cupsd.conf (by
default only localhost can print).