mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 05:35:30 +02:00
[GH-ISSUE #757] [Bug]: Virtual Printer proxy mode: Bambu Studio tries to connect to phyiscal IP when starting printing #506
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy#506
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 @Utility9298 on GitHub (Mar 19, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/757
Originally assigned to: @maziggy on GitHub.
Bug Description
When trying to print from Bambu Studio to a virtual printer in proxy mode, Bambu Studio shows a pop with pre-filled phyiscal IP adress of the printer and asks for the access code.
The virtual printer are found automatically in Bambu Studio, I made sure that Bambu Studio is not able to see the physical printers.
Expected Behavior
Bambu Studio sends the print to the virtual printer and BamBuddy sends it to the physical printer.
Steps to Reproduce
I did also try to add several network adapters (for each printer a dedicated network adapter) but it did not change the behaviour. Also tried the network override on virtual printer settings.
Printer Model
A1
Bambuddy Version
0.2.3b1
Printer Firmware Version
01.07.02.00
Installation Method
Docker
Operating System
Linux (Ubuntu/Debian)
Relevant Logs / Support Package
bambuddy-support-20260319-070439.zip
Screenshots
BambuStudio asking for access code on the physical IP adress when printing:
Additional Context
No response
Checklist
@maziggy commented on GitHub (Mar 19, 2026):
I completely re-wrote the proxy to make it more reliable for different network setups. Please use latest daily build and let me know if it works for you.
docker pull ghcr.io/maziggy/bambuddy:daily
Please note: requirements for the VP proxy have changed. Please check https://raw.githubusercontent.com/maziggy/bambuddy/refs/heads/dev/docs/migration-vp-ftp-port.md and updates Wiki docs.
@Utility9298 commented on GitHub (Mar 19, 2026):
I double checked: my server does not have an iptable routing from 990 to 9990.
my compose - file:
Still receiving a pop-up, but at least it shows now the IP of the virtual printer:
@maziggy commented on GitHub (Mar 19, 2026):
Don't think that this is the access code from you printer's display ;)
@maziggy commented on GitHub (Mar 19, 2026):
And you need to connect to the IP address of the VP assigned interface.
@Utility9298 commented on GitHub (Mar 19, 2026):
It is the access code from the printer:
IP of the virtual printer: 192.168.73.13
IP of the phyiscal printer: 10.73.51.85
@maziggy commented on GitHub (Mar 19, 2026):
Sorry, but need to double check. Are you sure running the daily image i just pushed some minutes ago?
If so, please upload new debug logs.
@Utility9298 commented on GitHub (Mar 19, 2026):
v0.2.3b1: docker compose pull with bambuddy:daily is telling me state "pulled"
Here is the debug log:
bambuddy-support-20260319-162722.zip
@maziggy commented on GitHub (Mar 19, 2026):
Cany ou please try with your X1C? I did comprehensive testing today with a H2D and a X1C. Just to rule-out that there is something different with the the A1. Thanks.
@fadudba commented on GitHub (Mar 19, 2026):
I’m seeing very similar behavior on my side.
My setup:
• Synology NAS
• Bambuddy in Docker with network_mode: host
• NET_BIND_SERVICE enabled
• real printer is an A1 Mini
• printer is in LAN Only Mode with Developer Mode enabled
• Bambuddy virtual printer is configured in Proxy mode
What I did:
• created a dedicated secondary IP on the NAS for the virtual printer
• set Bambuddy to bind the virtual printer to that dedicated IP
• set the Network Interface Override to that same IP/interface
• added Bambuddy’s CA certificate to Bambu Studio’s printer.cer
• added the virtual printer in Bambu Studio using the real printer’s access code
What happens:
• Bambu Studio don't let me add my virtual printer manually
• Bambuddy logs show the proxy services starting correctly and Bambu Studio reaching ports like 3000/3002/8883
• but the connection is still unstable, and the behavior feels like Studio is trying to fall back to the physical printer path instead of staying fully on the proxy path
@maziggy commented on GitHub (Mar 19, 2026):
You need to be careful! If you enable VP proxy mode and the slicer can reach your printer directly, then the slicer is receiving duplicate SSDP advertisements - one from Bambuddy and one directly from the printer.
And if you can reach the printer directly, you don't need proxy mode.
@Utility9298 commented on GitHub (Mar 20, 2026):
You are right. The P2S, H2C and the X1 Carbon are working now.
The A1 still brings up the connection-screen.
@maziggy commented on GitHub (Mar 20, 2026):
Thanks for the detailed testing and logs! We've confirmed the proxy infrastructure itself works correctly for the A1 — MQTT, FTP, and bind connections all succeed. The issue is that BambuStudio still rejects the printer despite successful connections, which means BS is doing something A1-specific that we're not handling yet.
We've added diagnostic probing in the latest dev branch to detect if BambuStudio tries to connect on ports we don't proxy (21, 80, 443).
Can you test with the dev branch?
git clone -b dev https://github.com/maziggy/bambuddy.git
cd bambuddy
docker compose up --build -d
Then try adding the A1 in BambuStudio and upload new debug logs. We're looking for any PROBE: warnings in the log — they'll tell us if BS connects on a port we don't handle.
Also, can you test one more thing? Temporarily change your A1 virtual printer's model to X1 Carbon in the VP settings, then try adding it in BambuStudio again. If it works as X1C but not as A1, we know the issue is model-specific in BambuStudio's connection flow. You can change it back afterwards.
If you can also run a tcpdump, that would give us the complete picture:
docker exec bambuddy tcpdump -i any host <SLICER_IP> -nn -w /tmp/a1-proxy.pcap
docker cp bambuddy:/tmp/a1-proxy.pcap .
This will show us every port BambuStudio tries to connect to.
@Utility9298 commented on GitHub (Mar 20, 2026):
I will test this and share my results next monday, I am off the office for this weekend and do not have access to Bambuddy / the printers.
@Utility9298 commented on GitHub (Mar 23, 2026):
Testing with v.0.2.2.1:
I do use proxy mode - but for testing I switched to queue and used the virtual A1 -> Works when using "send" to send files to the queue directly from BambuStudio.
Here is the tcpdump (I did run it from the host because tcpdump seems not to be available in the bambuddy container):
a1-proxy.zip
My testing IP is the 192.168.73.74
And the debug log file from bambuddy:
bambuddy-support-20260323-072422.zip
@maziggy commented on GitHub (Mar 23, 2026):
Did you check release notes for 0.2.2.1? There are changes required for the changed proxy function.
@Utility9298 commented on GitHub (Mar 23, 2026):
Yes, I did this already before testing with 0.2.3b1.
The other printers work fine - only the a1 is making trouble.
Runnind docker with
network_mode: hostand thecap_add: - NET_BIND_SERVICE #Required for virtual printer proxy (port 990).Also there are no existing iptables any more:
sudo iptables -t nat -L PREROUTING -n | grep 9990-> Empty output@maziggy commented on GitHub (Mar 23, 2026):
Your tcpdump is very helpful!
It looks like the A1 is also using port 2024 which is not used by any other model. Need to find out what's happening on this port.
@Utility9298 commented on GitHub (Mar 23, 2026):
I did upgrade the firmware on the a1 before adding it to bambuddy to version 01.07.02.00.
If I can do anything to help in debugging let me know - I can try an older firmware if a downgrade is even possible
@maziggy commented on GitHub (Mar 23, 2026):
Added proxy for port 2024-2026.
Please use dev branch and rebuild the image
git checkout dev && git pull && docker compose down && docker compose up -d --build
and try again. Please enable debug logging before testing.
Also can you please scan for open ports on your A1?
nmap -sT -p- <A1_PHYSICAL_IP>
@Utility9298 commented on GitHub (Mar 23, 2026):
No open ports on 2024 found:
Seems like I can't find any virtual printer with the dev branch. No printers are shown in BambuStudio and can't connect them manually.
Another interesting thing showing a difference beetween A1 and the other printers:
@maziggy commented on GitHub (Mar 23, 2026):
Port 2024 finding: Very interesting that the A1 doesn't have port 2024 open. This means BambuStudio is trying to connect to port 2024 on the printer/VP IP, but the A1 itself doesn't serve anything there. Two possibilities:
Either way, the proxy accepting and attempting to forward will currently fail upstream. We may need to handle this differently — possibly just accept and close the connection gracefully instead of proxying it.
VP discovery not working on dev: The only VP code change on dev (vs 0.2.2.1) is the port 2024-2026 proxy addition — SSDP discovery code is identical. This is likely a build/config issue rather than a code regression. Can you please
If you can share the logs from the dev branch attempt, that would help narrow it down.
Thanks!
@Utility9298 commented on GitHub (Mar 23, 2026):
I hope I did nothing wrong when building the image (I am a git noob).
Here is the debug log with the developer version, as you described I:
bambuddy-support-20260323-115954.zip
@maziggy commented on GitHub (Mar 23, 2026):
2026-03-23 11:59:04,593 ERROR [backend.app.services.virtual_printer.manager] Cannot create directory /app/data/virtual_printer/uploads: Permission denied. For Docker: ensure the data volume is writable by the container user. For bare metal: run 'sudo chown -R $(whoami) /app/data/virtual_printer'
2026-03-23 11:59:04,593 ERROR [backend.app.services.virtual_printer.manager] Cannot create directory /app/data/virtual_printer/certs: Permission denied. For Docker: ensure the data volume is writable by the container user. For bare metal: run 'sudo chown -R $(whoami) /app/data/virtual_printer'
2026-03-23 11:59:04,607 WARNING [root] Failed to sync virtual printers: [Errno 13] Permission denied: '/app/data/virtual_printer/uploads'
@Utility9298 commented on GitHub (Mar 23, 2026):
My mistake - Didn't see the the user mapping in the dev compose file.
But the print worked now. I was able to select the virtual A1 in proxy mode and start the print directly from BambuStudio.
So it is really something with port 2024 which is most likely temporarily opened on the printer?
bambuddy-support-20260323-161330.zip
@maziggy commented on GitHub (Mar 23, 2026):
Looks good according to the logs.
So is your issue resolved now?
@Utility9298 commented on GitHub (Mar 23, 2026):
Yes, the A1 is printing now.
Thank you very much!
@maziggy commented on GitHub (Mar 23, 2026):
If you find Bambuddy useful, please consider giving it a ⭐ on GitHub — it helps others discover the project!
@Christophe999s commented on GitHub (Mar 25, 2026):
I was having the same issue when using proxy mode to my P1S. Had to use wireshark to figure out why VP wasn't working when my firewall was enables and I saw that connection attempts were made to port 2024. Added a rule to allow tcp 2024 traffic and VP is working now.
I'm using nftables and these are the ports I have open on the VP network interface: tcp dport { 2024-2026, 3000, 3002, 8883, 990, 6000, 322, 50000-50100 } accept
Could you update the documentation on https://wiki.bambuddy.cool/features/virtual-printer/ for those that come after?
@maziggy commented on GitHub (Mar 25, 2026):
Why the hell the docs are not updated. Let me check.....
Thanks for pointing this out! Added new ports to all related docs.