Moving a working Suse Linux CUPS PC to a newsubnet IP address

Paul McIlfatrick paul.mcilfatrick at bt.com
Wed Aug 22 02:18:32 PDT 2007


> Paul McIlfatrick wrote:
> > A few days ago I posted to this newsgroup about not being able to
> > access the http://printhost:631/ CUPS admin pages after we had moved
> > our fully working Suse Linux PC to a new subnet IP address. Printing
> > worked fine after the move.
> >
> > Today, I moved the PC back to its old IP address. We are again able
> > to access the http://printhost:631/ CUPS admin pages and printing
> > works!
> >
> >
> > Our Suse Linux CUPS PC must be moved to the new subnet.
>
> In general this should be no problem.
>
> > Does anyone know what needs to be modified so that after the change
> > of IP address for a CUPS PC the http://printhost:631/ CUPS admin
> > pages are accessible?
>
> Assuming that "printhost" is the valid name of the new network
> location. I think, it's unneccersary to say, that using the old
> network name (of old ip adress) is an useless attempt. :-)

We modify the DNS entry of printhost in our master DNS server when we are moving the Suse PC to its new IP address, so printhost is correct.


> I see two issues at the moment:
> a) your network address (= ip address) changes after (!) start of cups
>    daemon.
>    Solution:
>    - don't do that. :) Either configure correct adress into your
>      system, e.g. edit /etc/hosts

The following three files are modified when moving a Suse Linux PC to a new IP address:

/etc/hosts
/etc/sysconfig/network/routes
/etc/sysconfig/network/ifcfg-eth-id-<MAC address>

The PC is then rebooted and the new subnet LAN cable attached during the reboot.

>    - or re-start cups after new network configuration, do as root
>      on a command line shell: /etc/init.d/cups restart
> b) your cups configuration (file: /etc/cups/cupsd.conf) contains
>    values of old subnet. Change the file appropriate.

No mention is made of any subnet in the /etc/cups/cupsd.conf file.


Here is part of the /etc/cups/cupsd.conf file:

ServerName printhost.xxxx.yyyy.zzzz
ServerAdmin services at xxxx.yyyy.zzzz
# Show troubleshooting information in error_log.
LogLevel debug
Printcap /etc/cups/printcap
User lp
Group lp
RunAsUser Yes
# Allow remote access
Port 631
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
<Location />
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin>
  AuthType BasicDigest
  AuthClass Group
  AuthGroupName sys
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
# Allow remote access to the configuration files...
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
  Allow @LOCAL
</Location>
<Policy default>

<snip>


There are 3 subnets one for each floor in our offices (10.230.197.x, 10.230.198.x, 10.230.199.x) and our printhost works fine when on 10.230.199.x subnet.

Printing works fine for all users on all the subnets and my team can access the http://printhost:631/ CUPS admin pages from their PCs which are also on the same 10.230.199.x subnet.


Because of a policy decision all our servers must be moved to a new subnet away from the users. This new subnet is 10.230.189.x.

When printhost is moved to an IP address in this new subnet range, e.g. 10.230.189.192, then:

1) all users on all the 10.230.197.x, 10.230.198.x, 10.230.199.x subnets can print OK.

2) my team can no longer access the http://printhost:631/ CUPS admin page from our PCs which are on the 10.230.199.x subnet and we get the '403 Forbidden' message.


Hope this extra information is helpful and will identify what needs to be changed to get this problem resolved.


Paul McIlfatrick




More information about the cups mailing list