From: Eric Hodel Date: 2003-01-28T09:04:52+09:00 Subject: Re: TCPServer only binding to INET6 interfaces? --MzdA25v054BPvyZa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Jason DiCioccio (geniusj@bluenugget.net) wrote: > --On Thursday, January 23, 2003 15:58 +0900 Eric Hodel=20 > wrote: >=20 > >You no doubt have sysctl net.inet6.ip6.v6only =3D 1 > > > >BEWARE THE SECURITY CONSEQUENCES OF CHANGING THIS TO 0 > > > >By changing it to '0', you will be able to listen on both tcp4 and tcp6 >=20 > That'd do it.. So there's no INADDR_ANY for IPv4 unless you compile=20 > without INET6 then I'm guessing? The correct solution is to listen on multiple socket types TCPServer.new('127.0.0.1', my_port) TCPServer.new('::1', my_port) WEBrick works this way, and it far more secure than setting that sysctl :) --=20 Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --MzdA25v054BPvyZa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE+NckiMypVHHlsnwQRAnIbAJ9YF+Gf/YHHP2EKoAbO3IWbsQmDWACfQmXP dlkJvHyKp5yDR6Q4jfU8+Pk= =BLwM -----END PGP SIGNATURE----- --MzdA25v054BPvyZa--