Print documents over the internet securely

Last validated:

Printers are typically limited to the local network they're connected to, making them inaccessible when you're away from home or the office. Because most printers can't run the Tailscale client themselves, you install Tailscale on an always-on device on the same network, such as a computer, Raspberry Pi, Apple TV, or NAS, and configure it as a subnet router. The subnet router securely relays traffic from your tailnet to the printer, letting you print from anywhere as if you were on the same local network, without exposing the printer to the public internet.

Prerequisites

To follow this guide, you need:

  • The device you want to print from, such as a laptop or phone. Tailscale runs on most operating systems, including Linux, Windows, macOS, iOS, and Android.
  • An email account that uses a single sign-on (SSO) identity provider, such as Apple, Google, or Microsoft.
  • An always-on device connected to the same local network as your printer to act as the subnet router, such as a computer, a Raspberry Pi, an Apple TV, an Android TV, or a network-attached storage (NAS) device like a Synology.
  • A printer that's already set up and working on your local network, as well as the printer's IP address.

Step 1: Create your tailnet

To create a tailnet, download and install the Tailscale client on the device you want to print from, such as a laptop or phone, and log in using your existing identity provider. Choose the Personal option and follow the remaining instructions to complete the process. Your personal tailnet is now configured and ready to use.

Go to the Machines page of the admin console to confirm the device is connected to your tailnet. The admin console is where you manage the users, devices, and permissions for your tailnet.

Next, find the LAN range for your printer.

Step 2: Find your local network range

A subnet router shares a range of local IP addresses, written in a format called CIDR. Most home networks use a range like 192.168.1.0/24, which typically covers every device on a basic network, including your printer.

To find the range for your network, look at the local IP address of the device you're setting up as the subnet router:

  • On Windows, open a command prompt and run ipconfig, then look for the IPv4 Address.
  • On macOS, open a terminal and run ifconfig, then look for an address that starts with 192.168 or 10..
  • On Linux, open a terminal and run ip addr, then look for an address that starts with 192.168 or 10..
  • On an Apple TV or Android TV, open the device's network settings and look for its IP address.

If the device's local IP address is something like 192.168.1.42, your network range is 192.168.1.0/24. Replace the last number with a 0 and add /24 to the end. This works for most home networks. If your network uses a different subnet mask, check your router's settings for the correct range.

Locate the printer's local IP address, which you'll use later to add the printer on your remote device.

Your router might assign the printer a different IP address over time, which breaks the connection to the printer. To prevent this, reserve the printer's IP address in your router's DHCP settings.

Next, set up a device in your tailnet as the designated subnet router.

Step 3: Install Tailscale on your always-on device

On the always-on device that shares the local network with your printer, download and install the Tailscale client, then sign in with the same identity provider you used to create your tailnet. After it's connected, go to the Machines page of the admin console and confirm the device appears in your tailnet.

Devices in a tailnet periodically re-authenticate to stay secure through device key expiry, which requires re-authentication after a set period. For a device that should remain continuously connected, such as a subnet router, you can disable key expiry to avoid any unnecessary disruptions.

To disable key expiry for a device, go to the Machines page of the admin console, select the ellipsis icon icon next to the device, then select Disable key expiry.

Disabling key expiry reduces security and can expose your network if the device or key is compromised. Only do this for trusted devices and revoke the key immediately if the device is lost or replaced. For more information, refer to Key expiry.

On the device acting as the subnet router, configure the device's Tailscale client to share your local network range. Replace 192.168.1.0/24 with the range you located in the previous step.

For more detail and additional platforms, refer to Configure a subnet router.

Next, approve the subnet route in the admin console.

Step 4: Approve the subnet route

Advertising a route makes it available, but Tailscale requires you to approve it before any device can use it. This keeps you in control of what's shared in your tailnet.

Go to the Machines page of the admin console and locate the subnet router in the list. It displays a Subnets badge. Select the ellipsis icon menu next to the device, select Edit subnet routes, check the box for the network range you advertised, then select Save.

Next, update your tailnet policy file to control who in your tailnet can use the printer.

Step 5: Control access to your printer

Your tailnet has a policy file that defines which users and devices can connect to which devices in your tailnet. If your tailnet policy file is already modified, the existing rules might prevent your devices from reaching the printer through the device acting as the subnet router. In that case, add a grant that permits access to the printer.

By default, the policy file lets everyone on your tailnet reach every device, so if you haven't changed it, you can skip this step.

Control access by user

You can permit access by listing specific tailnet users. Replace the source with the email addresses of the users you want to permit, and the destination with your printer's IP address.

{
  "grants": [
    {
      "src": ["alice@example.com", "bob@example.com"],
      "dst": ["192.168.1.50/32"],
      "ip": ["*"]
    }
  ]
}

In this example:

  • src identifies the tailnet users who can access the printer. Replace the example email addresses with the users in your tailnet.
  • dst identifies which device the grant applies to. Replace 192.168.1.50/32 with your printer's IP address. The /32 suffix matches only that single device. Using /24 instead would grant access to every device in the 192.168.1.x subnet.
  • ip controls which IP traffic is permitted to the device specified by dst. Leave "*" to allow any traffic needed to use the printer.

Control access by device

You can also permit access by listing specific devices, so only those devices can reach the printer. Replace the source with the Tailscale IP addresses of the devices you print from.

{
  "grants": [
    {
      "src": ["100.101.102.103/32", "100.104.105.106/32"],
      "dst": ["192.168.1.50/32"],
      "ip": ["*"]
    }
  ]
}

Update the following values to match your environment:

  • src identifies the devices that can access the printer. Replace the example Tailscale IP addresses with the Tailscale IP addresses of the devices you want to permit. Use /32 to match a single device.
  • dst identifies which device the grant applies to. Replace 192.168.1.50/32 with your printer's IP address. The /32 suffix matches only that single device.
  • ip controls which IP traffic is permitted to the device specified by dst. Leave "*" to allow any traffic needed to use the printer.

Add the grant to the grants section of your policy file, then save your changes. For more information, refer to details about grants and the tailnet policy file.

Next, add the printer settings on your remote devices and test a print job.

Step 6: Add the printer on your device and test

After the route is approved, the device you print from can reach the printer through the subnet router whenever both devices are connected to your tailnet.

How you add the printer depends on the operating system of the device you print from. In every case, add the printer manually using the local IP address you noted earlier rather than relying on automatic printer discovery, which doesn't work reliably across a tailnet. Because you reach the printer over your tailnet through the subnet router, this works whether your remote device is on the same local network or a different one, including networks that use virtual LANs.

We recommend using your printer manufacturer's app to connect to the printer's local IP address over your tailnet. Most major manufacturers, including HP, Canon, Epson, and Brother, offer apps that let you add a printer by its IP address.

AirPrint might work over your tailnet, but iPhone and iPad rely on local network discovery to find printers. When you're away from home, your printer might not appear in the list of available printers, and these devices don't support adding an AirPrint printer by its IP address. A manufacturer's app that supports this option lets you connect directly to your printer.

Now that you've added the printer, print a test job from the tailnet device you authorized to access the printer over the internet.

Conclusion

In this guide, you created a tailnet, set up an always-on device as a subnet router, and connected to your printer from a remote device. This setup gives you a private, encrypted way to print to a printer on your home or office network from anywhere, without exposing the printer to the public internet. Because you reach the printer through your tailnet, only devices on its local network and devices you authorize in your tailnet can connect to it.

You can also use the same subnet router to reach other devices on your network that can't run Tailscale, such as smart home devices or a network-attached storage (NAS) device.

Further exploration

  • Add additional devices to your tailnet.
  • Invite other users to your tailnet to let them print to your printer.
  • Configure your subnet router as an exit node to securely route your internet traffic through your home network when away from your local network.