Replies: 0 comments 25 replies
-
I tried to open a bug, but it has been closed with no explanation : I agree, this may not be a bug, this may be a "lack of feature" (c) :-) For now, hbbs does not listen on my IPv4 address. So, it's pretty useless... |
Beta Was this translation helpful? Give feedback.
-
Hi, Bug #7056 is still closed, I have no idea why. In the meantime, a friend of mine made a new install on different VM, on different location, with different OS (Ubuntu), and with default network configuration (both IPv6 and IPv6 addresses). Same weird behavior :
As only IPv4 is available on the WAN link and on the gateway router, this leads to the following behavior :
The faulty code seems to be here. I don't really know Rust language, but I would say if IPv6 socket succeeds, it does not ever try to open an IPv4 socket : As this behavior has been seen on two different locations, on two different VMs and OSes, on two different installations made by two different people, I can't imagine we're the only guys facing that problem... Does that mean RustDesk is IPv6 only, and IPv4 / dual stack is not supported at all ? KInd regards |
Beta Was this translation helpful? Give feedback.
-
Same thing, and there's no way to tell it to listen on ipv4, it only listens on ipv6, use debian 12 distro. |
Beta Was this translation helpful? Give feedback.
-
version: '3' networks: services: hbbr: |
Beta Was this translation helpful? Give feedback.
-
Hi @monat78. Please, could you explain the previous post with some words ? This post seems to show some data about hbbs / hbbr running in containers, and it does not show any distinction between IPv4 and IPv6. My bug report was about running hbbs / hbbr on bare Linux machines (Debian and Ubuntu), without any container. What I said is that when hbbs binds to IPv6, it does not ever try to bind to IPv4. And, a sub-problem is that it manages to bind on IPv6 even on machines where there's no IPv6 ! This is not a correct behavior. "Dual stack" good practices, where both IPv4 and IPv6 are active, is to bind on both protocols for incoming connections. For outgoing connections, good practices are to try IPv6 first, and if it fails, try IPv4. I browsed the source, and I pointed out a piece of code where I think the problem resides. Anyway, I'm not a Rust programmer, and I can't solve the problem by mysef. Does your answer mean RustDesk does not support IPv4 ? Or that RustDesk is supported only inside containers ? Thank you in advance. Kind regards |
Beta Was this translation helpful? Give feedback.
-
I have encountered exactly the same problem on ubuntu 22.04. So I forked a copy of the rustdesk-server repository on github and did some tinkering in the code. I added some diagnostics to the new_socket functions in tcp.rs and udp.rs. I also have zero knowledge of rust! However I managed to cobble together something that built. This showed that only ipv6 addresses were being asked for! This means that the problem must be in the server default config. The config mechanism seems to be pretty much undocumented. The only thing I could find was some environment variables in the the top level REAMDE.md. My next step is to set RUST_LOG=trace and see what I can find. |
Beta Was this translation helpful? Give feedback.
-
Here are the mods. Here is the trace log. I still have not got as clue as to why no ipv4 addresses are being requested. I think the answer my lie somewhere in socket_client.rs. Rust expertise urgently required! |
Beta Was this translation helpful? Give feedback.
-
You'd better try deploy though docker And the reason why your issues got closed is because you should post your issues at discussions, issues only store organized issues about devs. And you said:
I hope you look carefully. |
Beta Was this translation helpful? Give feedback.
-
I have created pull request #395 |
Beta Was this translation helpful? Give feedback.
-
I also tried the work around of using the latest docker images. These exhibit exactly the same problem as the bare metal version. IPv6 ports only! |
Beta Was this translation helpful? Give feedback.
-
I get the same erroneous behaviour on a newly-created VM (the current standard Ubuntu 22.04 image used by Windows 11 Hyper-V Quick Create) and just following the instructions at https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/install/ Clearly it's not working as intended... |
Beta Was this translation helpful? Give feedback.
-
By my count that makes at least five of us with the same issue (bc109, their friend, monat76, rogerjames109, and myself). There's clearly some systematic issue. |
Beta Was this translation helpful? Give feedback.
-
Perhaps the issue is not that IPv4 isn't enabled, just that netstat doesn't report them as listening. I note that a number of people have issues with confusion about nginx (appearing in netstat to be) not listening on IPv4, even when it actually is. Using ss (rather than the deprecated netstat) also shows the ports as listening with -lp and with -lp6, but not with -lp4:
However, an external nmap scan of the box shows the ports responding to IPv4 ack scans:
|
Beta Was this translation helpful? Give feedback.
-
Update: my system is working properly -- and thus clearly listening -- on IPv4 despite netstat showing that it is only listening on IPv6. Thus there never was an issue, only the appearance of one. I'm not entirely clear on why this is, perhaps IPv6 automatically deals with the IPv4 address space using the ::ffff:0:0/96 special address range that maps IPv4 addresses. In any case, I found several other software projects (e.g. nginx) which note a similar behaviour. |
Beta Was this translation helpful? Give feedback.
-
I have withdrawn my pull request. It was nonsensical! My only excuse is that I have been recovering from a bout of pneumonia and have lost the plot somewhat. The code is working as expected. When you create an ipv6socket, set the ipv6_only flag to false, and bind to the the ipv6 "any" address "[::]:*". The socket will accept ipv4 connections, but it will map the incoming ipv4 address into an ipv6 address using the standard rules. Here is an example.
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately, I also encountered the same problem. I don’t want to hear too much theoretical knowledge. I just want to say that I can access through |
Beta Was this translation helpful? Give feedback.
-
Hi,
I made a fresh install of hbbs / hbbr on a Debian 12 VM. IPv6 is disabled. The VM only has one IPv4 address :
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:15:5d:00:02:b8 brd ff:ff:ff:ff:ff:ff inet 10.111.222.20/24 brd 10.111.222.255 scope global eth0 valid_lft forever preferred_lft forever
When running hbbs, it seems to start listening on IPv6 sockets (that's funny on a machine with no IPv6 address ), and it does not listen at all on IPv4 sockets :
netstat -an | grep 2111
tcp6 0 0 :::21117 :::* LISTEN
tcp6 0 0 :::21116 :::* LISTEN
tcp6 0 0 :::21119 :::* LISTEN
tcp6 0 0 :::21118 :::* LISTEN
tcp6 0 0 :::21115 :::* LISTEN
udp6 0 0 :::21116 :::*
Moreover, I didn't find any configuration file / parameter where I could specify on which IP address I would like it to bind.
As it does not listen at all on IPv4 sockets, of course, it does not accept connections via IPv4 !
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions