Date: Thu, 2 Mar 2006 08:32:36 -0600 From: "Ryan Rempel" <rgrempel@gmail.com> To: "matthew@acintrix.net" <matthew@acintrix.net> Cc: freebsd-questions@freebsd.org Subject: Re: FreeNX in FreeBSD Jail Message-ID: <fb5ec4230603020632he74dd14kdf9eb285d656e86e@mail.gmail.com> In-Reply-To: <fb5ec4230603010918h39f8ac3dm10e0b24288f9f727@mail.gmail.com> References: <E58B53BF-A71D-42E1-B9A4-39103D3E3BF8@acintrix.net> <fb5ec4230603010918h39f8ac3dm10e0b24288f9f727@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3/1/06, Ryan Rempel <rgrempel@gmail.com> wrote: > > On 2/28/06, matthew@acintrix.net <matthew@acintrix.net> wrote: > > Has anyone had any experience running FreeNX in a FreeBSD Jail. It > > starts to connect then goes to connection failed, I can use XDMCP from = the > > same box and everything works fine, any suggestions? Thanks in Advance. > > I've done it, so it is possible to get it to work. I can't remember now i= f > there were any partiuclar issues in setting it up -- one suggestion would= be > to check the log files for something that might shed light. I forgot -- there was an issue when I set this up. There is code in the nxserver, in nxcomp/Loop.cpp, that checks whether the connection is coming from an expected IP address (or something like that). What seems to happen is that it gets confused by the way that 127.0.0.1 in the jail gets translated to the jail's IP address, so it thinks they don't match. I made a patch for net/nxserver that kind of fixes the problem, but I should emphasize that this isn't a proper patch -- it just bypasses the check entirely, rather than trying to do it correctly in the jail. So it probably defeats something which contributes to security. That having been said, here's the patch: --- nxcomp/Loop.cpp.orig Sat Feb 5 14:10:48 2005 +++ nxcomp/Loop.cpp Thu Mar 2 08:15:12 2006 @@ -4567,7 +4567,8 @@ char *connectedHost =3D inet_ntoa(newAddr.sin_addr); unsigned int connectedPort =3D ntohs(newAddr.sin_port); - if (*acceptHost =3D=3D '\0' || (int) newAddr.sin_addr.s_addr =3D=3D = acceptIPAddr) +// if (*acceptHost =3D=3D '\0' || (int) newAddr.sin_addr.s_addr =3D=3D = acceptIPAddr) + if (1) { #if defined(INFO) || defined (TEST) *logofs << "Loop: Accepted connection from '" << connectedHost
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fb5ec4230603020632he74dd14kdf9eb285d656e86e>