From owner-freebsd-questions@FreeBSD.ORG Tue May 8 16:27:09 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A2CA106566B for ; Tue, 8 May 2012 16:27:09 +0000 (UTC) (envelope-from peter@vereshagin.org) Received: from mx1.skyriver.ru (ns1.skyriver.ru [89.108.118.221]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB928FC0C for ; Tue, 8 May 2012 16:27:09 +0000 (UTC) Received: from localhost (tor-exit-router37-readme.formlessnetworking.net [199.48.147.37]) by mx1.skyriver.ru (Postfix) with ESMTPSA id 6855A5AB0 for ; Tue, 8 May 2012 20:27:06 +0400 (MSK) Date: Tue, 8 May 2012 20:26:59 +0400 From: Peter Vereshagin To: freebsd-questions@freebsd.org Message-ID: <20120508162659.GC12053@external.screwed.box> References: <898E0B3D-63DD-470C-8F1D-49F478D05C7E@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <898E0B3D-63DD-470C-8F1D-49F478D05C7E@gmail.com> Organization: ' X-Face: 8T>{1owI$Byj]]a; ^G]kRf*dkq>E-3':F>4ODP[#X4s"dr?^b&2G@'3lukno]A1wvJ_L(~u 6>I2ra/<,j1%@C[LN=>p#_}RIV+#:KTszp-X$bQOj,K Subject: Re: securing MySQL: easiest/best ways? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2012 16:27:09 -0000 Hello. 2012/05/08 06:49:01 -0700 Paul Beard => To FreeBSD-questions : PB> Monkeying with IPv6, I discovered that globally routable addresses are what it says on the tin, so hiding behind a network appliance is not longer viable for me. An nmap scan showed the port 3306 was hanging out for all to see but I couldn't figure out how to close it off. The "--skip-networking" argument seems not to work, either in my.cnf or as an rc argument. The server just fails to start. (For some reason the socket is hard-coded to live in /tmp, regardless of what's in my.cnf but I gave up bothering about that.) How can you know for sure that your my.cnf is being taken into the account by mysqld at all? I remember some issues that made me to put a symlink /etc/my.cnf to ..//usr/local/etc/my.cnf ... PB> What I ended up doing was adding PB> PB> mysql_args="--bind-address=127.0.0.1" PB> PB> to /etc/rc.conf. This seems to work as netstat and sockstat no longer show port 3306 listening and database connections are happening. PB> PB> Is this the preferred/best way? I just think locking mysqld into the jail(4) is better. ;-) PB> Are you trying to win an argument or solve a problem? Whatever I may need. -- Peter Vereshagin (http://vereshagin.org) pgp: A0E26627