From nobody Sun Jan 7 20:05:08 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7TFR0K9Bz55shd for ; Sun, 7 Jan 2024 20:24:43 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4T7TFQ0lgQz4nrc for ; Sun, 7 Jan 2024 20:24:42 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 198.144.192.42 is neither permitted nor denied by domain of yuri@FreeBSD.org) smtp.mailfrom=yuri@FreeBSD.org Received: from [192.168.5.3] (c-98-42-44-116.hsd1.ca.comcast.net [98.42.44.116]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id 407K59gK070166 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sun, 7 Jan 2024 12:05:11 -0800 (PST) (envelope-from yuri@FreeBSD.org) X-Authentication-Warning: shell1.rawbw.com: Host c-98-42-44-116.hsd1.ca.comcast.net [98.42.44.116] claimed to be [192.168.5.3] Content-Type: multipart/alternative; boundary="------------rtoQKyunFcLZkRH5CRSds6sQ" Message-ID: <4069a345-5799-4608-9480-f7183ef48ab2@FreeBSD.org> Date: Sun, 7 Jan 2024 12:05:08 -0800 List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "freebsd-net@freebsd.org" From: Yuri Subject: /etc/hosts doesn't work in jails? X-Spamd-Bar: + X-Spamd-Result: default: False [1.61 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; ONCE_RECEIVED(0.10)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; XM_UA_NO_VERSION(0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[freebsd.org]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_ALL(0.00)[]; GREYLIST(0.00)[pass,body]; FREEFALL_USER(0.00)[yuri]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_SPF_SOFTFAIL(0.00)[~all:c]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:7961, ipnet:198.144.192.0/23, country:US]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; TO_DOM_EQ_FROM_DOM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; HAS_XAW(0.00)[] X-Rspamd-Queue-Id: 4T7TFQ0lgQz4nrc This is a multi-part message in MIME format. --------------rtoQKyunFcLZkRH5CRSds6sQ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit For some mysterious reason github.com can't be connected to from my network because the IP address that DNS returns is unreachable. Setting the new resolution rules in /etc/hosts works on the base host: 140.82.112.4     github.com 140.82.113.10    codeload.github.com But the same doesn't work in the poudriere jail. The same modification in the jail's /etc/hosts didn't take effect. /etc/resolve.conf files are identical. I am wondering, are /etc/host files supposed to work in jail? (I solved this problem by adding the same rules for github.com in DNSMasq on the router.) Thanks, Yuri --------------rtoQKyunFcLZkRH5CRSds6sQ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

For some mysterious reason github.com can't be connected to from my network because the IP address that DNS returns is unreachable.


Setting the new resolution rules in /etc/hosts works on the base host:

140.82.112.4     github.com
140.82.113.10    codeload.github.com

But the same doesn't work in the poudriere jail. The same modification in the jail's /etc/hosts didn't take effect.

/etc/resolve.conf files are identical.


I am wondering, are /etc/host files supposed to work in jail?


(I solved this problem by adding the same rules for github.com in DNSMasq on the router.)



Thanks,

Yuri

--------------rtoQKyunFcLZkRH5CRSds6sQ--