From owner-freebsd-questions@freebsd.org Tue Jun 9 01:21:35 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4BDA3410B6 for ; Tue, 9 Jun 2020 01:21:35 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49gslf4QYNz46mH for ; Tue, 9 Jun 2020 01:21:34 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.25.204]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPA (Nemesis) id 1MDhQt-1jpr5Q2Ov9-00AoiG; Tue, 09 Jun 2020 03:21:31 +0200 Date: Tue, 9 Jun 2020 03:21:31 +0200 From: Polytropon To: Ernie Luzar Cc: "freebsd-questions@freebsd.org" Subject: Re: determining if host has a dynamic or static ip address Message-Id: <20200609032131.486b48a6.freebsd@edvax.de> In-Reply-To: <5EDECAF9.3080406@gmail.com> References: <5EDECAF9.3080406@gmail.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:1F7fMgnI+6BltXIb3/N2m3lA3W088DqyzvkcmoojAgkWtUt5UqL MiRU5rYVIem9SZ6o97xOrlQQYOxf+jGRvU1kfQwcjzietaY3Spg/5cNWc8AuCj1U+FZBBFE iyrMhDo2VVodD8NkkmBL0H+eSIyHGEnUN9x+x7UkNxvbmzKpEelY8fGqMhImMzzdaxYWMql PVtgKG/Mhx92qPqavaWiQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:xiusY1Vkq3Q=:YE/BjwfT8xZPfSjOL/mn28 MF4FvafsJ2zbAIesqjmVpABV0TNfh73WJ8zJMGAcl5HhT403x5TleFEQAZWvxKa/nQKwmECxV l13+lyACo2zxZvkOn6DVaH6boSNQcJ6vHkWNZpmlfPBwwbauHriz6T7xDSJcLqyk8l/UxS9Vc WeDRnOSFrCFgtHyPUB6Ci7tiITz5NeaRM59TZLi0lqVhztr2eqevU8MU7CkrbGLbRy3WYtqWe xNVoNFYo3x4CX6aL78jzMZMQXD8BoIH3ooOJOGTafKIuOTH0scLNl59mfATA2Gum+qcg+Njnx kmrQdCBC4Vns85RURtK5cDttwWh53hYS81oDAYhaY0nHgep+4vF4o+c2tNTGzVsFCN4DuY/++ rsgUMWTTptYJp5i49Y7m92hUpHlz4DFPMLQEV2VrHFEm9ckl6sWJ0NOBzYIuTbuk6/h/tLimD x6et6p5ooHgBYK2Ng24QxFi5MCUIWBO0c13bzYd/lzyG1XqsUneglrIaPws+LiXIIMda/hpOZ 3uB9+9SebYMSYTgXMRL3c7hqaQzufsMvv1eQB12i9gUoyp11hzL21YGkM9siKr2RvyYSCXFbI DTR3byadUvCDHVaSAD6Ptf1vimoQdE1MrVbUuDqeisWcbxigW2K1pMw1Pvne1M28FSB0Ps7Ju IvwhvDRpHvL0t2hcxZDHOebhdRSEYybtvGVRpqkzDoxLFLkjEpD0TLrjIyMedun/oIeRZVxWY H+giqTeRrn5VN8FtROOwiIPCrDnuc+sOJfX0rnLS0192WQSaIxgouk5HMIastUybDZcGSLlNf +t1nOE7rtPUk6kaVkcy4ju4aLD392dvJ1QiD4zUsgjo6jk/fbSR3FlZc8WWI0YrWhdp3JLC X-Rspamd-Queue-Id: 49gslf4QYNz46mH X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.131) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [2.77 / 15.00]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; NEURAL_HAM_SHORT(-0.40)[-0.398]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[94.222.25.204:received]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.19)[0.186]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.58)[0.582]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[212.227.126.131:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.126.131:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2020 01:21:36 -0000 On Mon, 08 Jun 2020 19:34:17 -0400, Ernie Luzar wrote: > I am asking if anyone knows of a way to determine what type of public ip > address the host has been ISP assigned [...] That's not exactly easy to tell. You can examine the hostname associated to the IP, and maybe it contains something like "pool" or "dynamic" - in that case, it's usually a dynamic IP from a specific range. There are ranges allocated by the ISPs that they use as a pool for customers' addresses assigned via DHCP (or a different means), for example. You can check if the IP is in such a range. Again, it's up to the ISP how they use such a range, as they could use a subset for addresses that they actually use as static IPs. The "rinse & repeat" method is also not reliable: You could disconnect and reconnect to your ISP, and if you get a different IP each time, it's probably dynamic. If not, it can still be assigned dynamically, so no way to be sure. Some ISPs sometimes "bind" the dynamic IP to the MAC address of the endpoint (and some even use the MAC address as the authentication factor for the customer). More information here: https://whatismyipaddress.com/dynamic-static > [...] by coding a csh script? Why should anyone do this in _C_ shell?! Tom Christiansen: "sh Programming Considered Harmful", 1996 http://harmful.cat-v.org/software/csh https://www-uxsup.csx.cam.ac.uk/misc/csh.html I know what I'm talking about, I exactly wrote (and still use) one, in numbers: 1, C shell script. ;-) > Is it even possible? Depends. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...