Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jun 2014 20:28:51 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        freebsd-jail@freebsd.org
Subject:   Re: Assign Lookback address 127.0.0.1 to jail
Message-ID:  <5397A2C3.1090109@freebsd.org>
In-Reply-To: <5397A16E.8080504@sky-ip.org>
References:  <53979DA8.60002@sky-ip.org> <5397A0D9.403@freebsd.org> <5397A16E.8080504@sky-ip.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--0NibSQHfFMdJob5WP0EHfXpwP7mXahol4
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 2014-06-10 20:23, s7r@sky-ip.org wrote:
> On 6/11/2014 3:20 AM, Allan Jude wrote:
>> On 2014-06-10 20:07, s7r@sky-ip.org wrote:
>>> Hi,
>>>
>>> Operating system is FreeBSD 10.0 64 Bit
>>>
>>> I have installed ezjail from ports and properly configured a jail
>>> with its own static and dedicated IP address. Everything works
>>> good, it's just that I have an application which requires to talk
>>> to another one via RPC on IP 127.0.0.1, and I have noticed the
>>> jail does not have a lo0 interface or localhost 127.0.0.1 IP
>>> address.
>>>
>>> This is bad because the application has no choice but to bind to
>>> the public IP address assigned to the jail, and it's not safe.
>>>
>>> How can I add a lo0 interface with IP 127.0.0.1 to a jail?
>>>
>>> Thanks in advance.=20
>>> _______________________________________________=20
>>> freebsd-jail@freebsd.org mailing list=20
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-jail To
>>> unsubscribe, send any mail to
>>> "freebsd-jail-unsubscribe@freebsd.org"
>>>
>=20
>> Does it have to be 127.0.0.1? You can add an alias like 127.0.0.2
>> to the lo0 interface and use that.
>=20
>> Inside the jail, 127.0.0.1 is mapped to the IP of the jail.
>=20
>> Using ezjail, you can also allocate more than 1 IP address to a
>> jail by comma separating them
>=20
>> You can also make it automatically alias the IPs for you with the
>> syntax:
>=20
>> em0|192.168.0.10,lo0|127.0.0.2 etc
>=20
>=20
>=20
> Thank you Allan for your fast reply.
>=20
> I have the jail already created via:
> # ezjail-admin create <jailname> <em0|public IP>
>=20
> How do I modify the already existing jail to have 127.0.0.2, for
> example, or can't  I just have 127.0.0.1 in the jail?
>=20
> _______________________________________________
> freebsd-jail@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-jail
> To unsubscribe, send any mail to "freebsd-jail-unsubscribe@freebsd.org"=

>=20

Stop the jail, and then edit /usr/local/etc/ezjail/jail_name

and change the line that defines the IPs

--=20
Allan Jude


--0NibSQHfFMdJob5WP0EHfXpwP7mXahol4
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJTl6LDAAoJEJrBFpNRJZKfJRIP/2NCXclD5N0aLE+Ek0usQoj5
Zfc7yxP+Flzd9IyQqto51WcBfuowU5QcRgRnq7sXRZC4lNdFJtOKzgJbJ+JxwjSO
pebt784HANCgR9hEekWJk81VSiaRIT9Zt5OZbzyfP7I6GrWReBt2V/KcC2jy9N+S
EE8G69rCnwgz19E12Up95DLcMSXrJcxG097n5Vs2EwvmrdwuAJpGLQkXktosA+0O
oioQbrHpiMw4fG1FfbgyXfNraKad8Ru3hRRPxDDFfhE6u9dMUjRba257vH2/utHu
jfJKS4Bn37qaQJq189sX08mzPD4j8lTL51rI0Ss38ht9/X/SX5pRInZkmJREKbwB
zVbexZIQnSqxM38g/LJdOdD6UsEFJA+U3WF10Y/43s5MKGLnjPR8dmDKKuNuXT+0
ulHOC5o9+NOAtd4xnaE8fLc/Q6A8SYt9XMHi5E/NfcHpehwedn9hV1ZEJOQ/dKuC
U3CSQYNXfj4hH5MMWNtgWz8dH1wY60FU2CxWOMNhyPLpcSho0AOdTKCTT/n63KKd
8BOr4AB+EXneipcJRwMCTtUeugbH7b5q9ensOLQs1oxdbuZgHSHdLs0vA8KSRSaH
gXsaBoeuU8JkgJnwIURBOiZ57SnIH5vjXzLRT9iX7u3xH5k+lOK3rSb1dcaxuLF3
YIFtHh/D7S2SdWT5Gp/3
=VA9N
-----END PGP SIGNATURE-----

--0NibSQHfFMdJob5WP0EHfXpwP7mXahol4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5397A2C3.1090109>