<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>I'll keep investigating. </div>
<div> </div>
<div>Many thanks for your input.</div>
<div> </div>
<div>Best wishes,</div>
<div> </div>
<div> </div>
<div>Will.</div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b> Thursday, August 06, 2015 at 1:10 AM<br/>
<b>From:</b> "Mihai Moldovan" <ionic@ionic.de><br/>
<b>To:</b> "Will Smith" <_will_@mail.com>, x2go-user@lists.x2go.org<br/>
<b>Subject:</b> Re: [X2Go-User] Problem connecting to Centos 7 (x2go 4.0.1.19).</div>
<div name="quoted-content">On 05.08.2015 06:37 PM, Will Smith wrote:<br/>
> Dear Mahai,<br/>
><br/>
> Many thanks for your response. I can ssh localhost from the server no problems.<br/>
<br/>
I wasn't talking just about connecting to localhost:22, but connections to<br/>
localhost with random ports.<br/>
<br/>
<br/>
> Indeed, all services on localhost are trsuted. Having investigated further, I<br/>
> can see that it uses the public IP address when attempting to bind to localhost<br/>
> rather than 127.0.0.1 when firewalld is running. Cf. with firewalld running, the<br/>
> logs contain<br/>
><br/>
> Info: Agent running with pid '204654'.<br/>
> Session: Starting session at 'Wed Aug 5 14:57:49 2015'.<br/>
> Info: Proxy running in server mode with pid '204654'.<br/>
> Info: Waiting for connection from 'localhost' on port '30011'.<br/>
> Warning: Refusing connection from '131.***.***.100'.<br/>
> 100' on port '30011',<br/>
<br/>
Urgh, yeah. It checks whether the connection comes from 127.0.0.1. If your<br/>
"localhost" entry does not map to that, connections WILL fail.<br/>
<br/>
<br/>
> and I'm unable to connect, but after stopping the firewalld service, and<br/>
> reconnecting, they contain<br/>
><br/>
> Info: Agent running with pid '214487'.<br/>
> Session: Starting session at 'Wed Aug 5 15:19:53 2015'.<br/>
> Info: Proxy running in server mode with pid '214487'.<br/>
> Info: Waiting for connection from 'localhost' on port '30011'.<br/>
> Info: Accepted connection from '127.0.0.1'.<br/>
> Info: Connection with remote proxy completed.<br/>
><br/>
> and I can connect no problem. The routing table is the same in both cases. My<br/>
> /etc/hosts file contains the localhost line first and the public hostname/IP<br/>
> address line second. Perhaps this is more of a firewalld question, but any<br/>
> further light which can be shed on the issue would be most useful.<br/>
<br/>
Maybe your resolver does weird things with firewalld running? In any case,<br/>
whether firewalld is running or not, localhost should (not just for X2Go, but in<br/>
general) not resolve to a public IP address.<br/>
<br/>
Sadly I have no idea what could be misbehaving, other than the resolver. The<br/>
hosts file should be prioritized in /etc/nsswitch.conf, but there's probably<br/>
ways to screw that up.<br/>
<br/>
<br/>
<br/>
Mihai<br/>
</div>
</div>
</div></div></body></html>