-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xrdp - vnc connection does not work in pure IPv4 scenario #1596
Comments
AFAIK there's no way to do that right now however it is the issue to be addressed. |
Hmm, as far as my reading of code, So even only IPv4 is available, it will fall back to IPv4 finally. I believe VNC connection will finally success with IPv4. |
Hi @metalefty thanks for the quick response. I understand that it falls back to IPv4, but that only happens if the firewall lets the IPv6 packages go through. In my test with those machines I opened the firewall so it accepted the IPv4 communication on the loop back interface but xrdp never started the IPv4 connection, it just fails after the sending IPv6 packages. |
@metalefty just to be clear: the firewall on those machines DROPs the ipv6 traffic and the connection attempt somehow does not make it to the ipv4 section of the code; when the firewall is off and there is nothing listening as ipv6 xrdp ends up connecting to ipv4; but unfortunately on these machines it is mandatory to have the firewall on. A suggestion would be having a configuration variable that control the IP version used to connect to vnc: 4, 6 or both |
This particular issue is almost certainly happening as the firewall DROP is causing the IPV6 connect attempt to return INPROGRESS, so IPV4 is never tried. There's a bit of a problem here - if a I've had a read of #714 too which is the last time this area of code was touched. Any changes will need quite a bit of testing, so this particular problem is going to need more effort to solve than is obvious at first sight. |
I can't see any workarounds to the immediate problem. The simplest solution I can see currently is to recompile xrdp without |
@matt335672 thanks so much for the answer. I'll leave here the firewall rules that we are using in case somebody else needs them:
Thank you once again. |
This Ubuntu host has the firewall turned off and flushed and still cannot start
|
We're looking at moving this interface to a UNIX domain socket which will make this problem go away. Can you try using "127.0.0.2" as a workaround in /etc/xrdp/sesman.ini? |
Hi. Using 127.0.0.2 bought me nothing and shows a different error:
|
Interesting. I've done a lot of work on this, and the fundamental problem seems to be that sesman is creating a socket with this call:-
and then any attempt to bind pure IPv4 to it will necessarily fail. There's no way round this at the moment, short of recompiling xrdp without |
Thanks, Matt. I see it now. If you need me to compile in order to confirm that leaving out |
Yes, that's my appraisal of the situation too. I think the correct fix here is to move to a UNIX domain socket for this interface. It removes the whole IPv4/IPv6 issue from this connection. It still needs addressing of course to fully support things like NeutrinoRDP, but not everyone is using that, whereas pretty much everyone is using the sesman connection. Thanks for the compilation offer, but I think we're clear about the actual issue now. Other than the recompile I can't offer you a non-hacky solution I'm afraid. Even if I did have a magic code patch to hand, it's not going to land in Ubuntu for some time, as those guys are very conservative about the patches they will take to issues packages. |
Hi, I have configured xrdp to communicate with a x11vnc server in localhost. I noticed that in some machines that I managed this didn't work. I noticed through tcpdump that xrdp was trying to communicate with vnc using IPv6. The machines where this didn't work have IPv6 disabled through firewall rules.
xrdp.ini:
Command used to launch x11vnc:
From my understanding, with these configurations there should be no reason for xrdp to be using IPv6, and still I see this on tcpdump:
I would like to have xrdp communicate purely through IPv4 with vnc. Is there a way to do this? I haven't find any options to control this.
Thanks in advance
The text was updated successfully, but these errors were encountered: