mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-27 02:25:51 +03:00
[GH-ISSUE #287] AirPrint Passthrough #266
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @squishycat92 on GitHub (Apr 13, 2022).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/287
Hello!
I ran into an issue with getting AirPrint to work over the IKEv2 VPN tunnel today and was wondering if you could provide some insight (I'm not entirely sure what is happening here). As per this StackExchange thread, users should explicitly define their printer IPs into a configuration profile. The client device will then directly query the IP for its printer resource and remotely print a document.
However, I've been having a bit of trouble getting this to work. I have defined the IP address and printer locations and verified them on my computer (see attached screenshot). When connected to the VPN tunnel remotely, the IP address is also reachable (
192.168.0.102). However, the device cannot discover the printer and simply displays the message "No AirPrint Printers Found".I suspect that this is caused by the fact that the VPN client is assigned a local IP that is on a different subnet than the rest of the local network (in my case the VPN ip is
192.168.43.xxxand the host is192.168.0.xxx). If this is the case, would there be a method to configure the VPN to use the host subnet instead of creating another one?Thank you so much!
Configuration of AirPrint (these work when on the LAN):

@hwdsl2 commented on GitHub (Apr 18, 2022):
@squishycat92 Hello! Thanks for reporting this issue. There is a way to use a different internal subnet for the VPN, but it is not straightforward to configure and is for advanced users only.
Just to test: If you can, try to temporarily set your local network to e.g. 192.168.43.0/24 and see if the AirPrint works.
@squishycat92 commented on GitHub (Apr 18, 2022):
I'm not sure if changing my LAN subnet would work - wouldn't the Docker container still be separated from the local network? Considering that the printer is reachable via a ping request while connecting to the VPN, I think that there might be some discovery packet that is not passed over the tunnel, causing iOS to be unable to reach the printer. Any ideas about what could be happening here?
@hwdsl2 commented on GitHub (Apr 19, 2022):
@squishycat92 Unfortunately, I am not familiar with how AirPrint works internally.
@squishycat92 commented on GitHub (Apr 19, 2022):
I believe it is just using avahi-daemon to advertise on the network... not sure if this can be passed through a tunnel?
I believe you can try setting up an experimentation setup - it's just a printer on CUPS being advertised through avahi, so I would imagine it's some sort of mDNS.
@squishycat92 commented on GitHub (Jun 5, 2022):
Hey @hwdsl2, I recently had time to look into this issue further. It seems like this is a bug with AirPrint rather than with the VPN tunnel. I have recently bought a new router, so it seems that this is not a router-specific issue either.
First, I tried pinging the CUPS server's IP address, which worked:
I then tried using
ipptoolto see if I could fetch information about the printer:This was able to get the information about the printer (using the

-vflag returned all the correct information about my printer), so I then tried to add it to my Mac (using IPP, not AirPrint) and print from there:The printer information was a bit off (didn't recognize any drivers either), but printing a test page was successful. Based on this, I think we can assume that this is a bug in Apple's AirPrint and close this issue?
Thanks!
@hwdsl2 commented on GitHub (Jun 6, 2022):
@squishycat92 Thank you for looking into this issue further and sharing your findings with us! I'm glad that you were able to connect to the printer using the alternative method. And yes, I think this is likely a bug in Apple's AirPrint. I'm going to close this issue as suggested.