Printing: Difference between revisions

imported>Cbergqvist
m typo: conntected
imported>Onny
Add openFirewall option to printer sharing example
Line 94: Line 94:
=== Printer sharing ===
=== Printer sharing ===


Enable network sharing of the default local printer, also known as "AirPrinting". Note that <code>listenAddresses = [ "*:631" ];</code> and <code>allowFrom = [ "all" ];</code> will enable anonymous access to your printer on all interfaces, you might want to restrict this.
Enable network sharing of the default local printer, also known as "AirPrinting". Note that <code>listenAddresses = [ "*:631" ];</code>, <code>allowFrom = [ "all" ];</code> and <code>openFirewall = true;</code> will enable anonymous access to your printer on all interfaces, you might want to restrict this.


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 111: Line 111:
   browsing = true;
   browsing = true;
   defaultShared = true;
   defaultShared = true;
};
   openFirewall = true;
networking.firewall = {
  allowedTCPPorts = [ 631 ];
   allowedUDPPorts = [ 631 ];
};
};
</syntaxhighlight>
</syntaxhighlight>