<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=5143&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / /etc/network/interfaces vs dhclient -s]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=5143</link>
		<description><![CDATA[The most recent posts in /etc/network/interfaces vs dhclient -s.]]></description>
		<lastBuildDate>Fri, 29 Jul 2022 22:51:13 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36838#p36838</link>
			<description><![CDATA[<p>Yes, one way would be to change the &quot;method&quot; for <span class="bbc">eth0</span> in (<span class="bbc">/etc/network/interface</span>) from <span class="bbc">dhcp</span> to <span class="bbc">manual</span> and instead have the <span class="bbc">dhclient</span> command as an <span class="bbc">up</span> command (i.e. to be run after that the interface is brought up at link level).</p><p>To do that you would first run it as <span class="bbc">dhcp</span>, then use <span class="bbc">pgrep dhclient</span> to get hold of the full command to run, which you copy to be the <span class="bbc">up</span>, with your modifications.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 29 Jul 2022 22:51:13 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36838#p36838</guid>
		</item>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36837#p36837</link>
			<description><![CDATA[<p>I know how to use &quot;reject&quot; in dhclient.conf . <br />When i say &quot;/sbin/ifup eth0&quot; , ifup starts dhclient and that sends DHCPDISCOVER-message to broadcast address.<br />The &quot;reject&quot; - statement reject responses from unwanted servers. </p><p>On the other hand, if dhclient sends DHCPDISCOVER-messages only to a server mentioned in &quot;-s&quot; option , &quot;reject&quot; may not be necessary. </p><p>(man page of dhclient says: &quot;&#160; -s server-addr<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; Specify&#160; the server IP address or fully qualified domain name to<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; use as a destination for DHCP protocol messages before&#160; dhclient<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; has&#160; acquired an IP address.&#160; Normally, dhclient transmits these<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; messages to 255.255.255.255 (the IP limited broadcast&#160; address)&quot;)</p><p>That made me think, how can i pass &quot;-s server&quot; to dhclient from ifup? I&#039;m yet to figure out if it is even possible. <br />Those &quot;up&quot;, &quot;pre-up&quot; , &quot;manual&quot; keywords in /etc/network/interfaces seemed interesting. Maybe with those i could gain more control, how i set up network interface.</p><p>Command &quot;dhclient -s something&quot; by itself is not enough to activate the interface and associate ip address with it. I have tried.</p><p>I don&#039;t actually need this thing i&#039;m trying. I just like to find out another way of doing things. (Just using /etc/network/interfaces instead of NetworkManager is not radical enough <img src="http://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />I have read /usr/share/doc/ifupdown/examples&#160; and it seems that it does not contain exactly the thing i&#039;m after .</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Fri, 29 Jul 2022 18:12:07 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36837#p36837</guid>
		</item>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36836#p36836</link>
			<description><![CDATA[<p>@nahkhiirmees: you might rather want to use the <span class="bbc">reject</span> statement in the client host&#039;s <span class="bbc">/etc/dhcp/dhclient.conf</span>. See <span class="bbc">man dhclient.conf</span> for details.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Fri, 29 Jul 2022 00:00:17 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36836#p36836</guid>
		</item>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36834#p36834</link>
			<description><![CDATA[<p>if you have a connection to the internet you may try Sheildsup&#160; (press &quot;Proceed&quot;) &quot;All Service Ports&quot; <a href="https://www.grc.com/shieldsup" rel="nofollow">https://www.grc.com/shieldsup</a></p><p>it will &quot;Determine the status of your system&#039;s first 1056 ports&quot;.</p><p>Quick and easy.</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Thu, 28 Jul 2022 22:50:57 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36834#p36834</guid>
		</item>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36832#p36832</link>
			<description><![CDATA[<p>Ok, i found out that i can alter iptables rules without activating ethernet interface. So chicken-and-egg can be avoided. But i&#039;m not sure that iptables rules i added, are restricting packets from port 67. I&#039;ll try again later.</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Thu, 28 Jul 2022 15:51:58 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36832#p36832</guid>
		</item>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36830#p36830</link>
			<description><![CDATA[<p>Is it possible to restrict the target address where dhclient sends DHCPDISCOVER messages? <br />The output of &quot;/sbin/dhclient --help&quot; and <a href="https://linux.die.net/man/5/dhclient-options" rel="nofollow">https://linux.die.net/man/5/dhclient-options</a> part &quot;option dhcp-server-identifier ip-address; &quot; make me think it is possible.<br />Ok i guess i could try with iptables, drop ports 67,68 from all unwanted servers or accept only from the server i want to. But for iptables to work, i have to set up the network interface eth0 , right? Kind of a chicken-and-egg situation.</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Wed, 27 Jul 2022 17:20:25 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36830#p36830</guid>
		</item>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36779#p36779</link>
			<description><![CDATA[<p>I tried some commands today:</p><p>1.sudo /sbin/ifdown eth0 + unplug the ethernet cable<br />2. /sbin/ifconfig says:</p><p>lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;&#160; mtu 65536<br />&#160; &#160; &#160; &#160; inet 127.0.0.1&#160; netmask 255.0.0.0<br />&#160; &#160; &#160; &#160; inet6 ::1&#160; prefixlen 128&#160; scopeid 0x10&lt;host&gt;<br />&#160; &#160; &#160; &#160; loop&#160; txqueuelen 1000&#160; (Local Loopback)<br />&#160; &#160; &#160; &#160; RX packets xxx&#160; bytes yyyyyy (yyy.y KiB)<br />&#160; &#160; &#160; &#160; RX errors 0&#160; dropped 0&#160; overruns 0&#160; frame 0<br />&#160; &#160; &#160; &#160; TX packets xxx&#160; bytes zzzzzz (zzz.z KiB)<br />&#160; &#160; &#160; &#160; TX errors 0&#160; dropped 0 overruns 0&#160; carrier 0&#160; collisions 0</p><p>3. find dhcp server address from /var/lib/dhcp/dhclient.eth0.leases<br />3,5. plug ethernet cable back in<br />4. sudo /sbin/dhclient -s &lt;server_addr&gt; eth0<br />5. after some waiting, give command /sbin/ifconfig, result:</p><p>eth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;&#160; mtu 1500<br />&#160; &#160; &#160; &#160; inet6 fe80::&lt;something&gt;&#160; prefixlen 64&#160; scopeid 0x20&lt;link&gt;<br />&#160; &#160; &#160; &#160; ether &lt;something&gt;&#160; txqueuelen 1000&#160; (Ethernet)<br />&#160; &#160; &#160; &#160; RX packets xxxxx&#160; bytes xxxxxxxxx (xxx.x MiB)<br />&#160; &#160; &#160; &#160; RX errors 0&#160; dropped 0&#160; overruns 0&#160; frame 0<br />&#160; &#160; &#160; &#160; TX packets yyyyy bytes yyyyyyyy (y.y MiB)<br />&#160; &#160; &#160; &#160; TX errors 0&#160; dropped 0 overruns 0&#160; carrier 0&#160; collisions 0</p><p>lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;&#160; mtu 65536<br />&#160; &#160; &#160; &#160; inet 127.0.0.1&#160; netmask 255.0.0.0<br />&#160; &#160; &#160; &#160; inet6 ::1&#160; prefixlen 128&#160; scopeid 0x10&lt;host&gt;<br />&#160; &#160; &#160; &#160; loop&#160; txqueuelen 1000&#160; (Local Loopback)<br />...</p><p>so the dhclient command by itself is not enough unless i want to change to ipv6. But not just yet. Let&#039;s make ipv4 work first. <br />And i guess that &quot;ip&quot; commands in /sbin/dhclient-script are there for a reason. So, what kind of &quot;ip&quot;-command should i use?</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Mon, 25 Jul 2022 11:07:23 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36779#p36779</guid>
		</item>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36778#p36778</link>
			<description><![CDATA[<div class="quotebox"><cite>nahkhiirmees wrote:</cite><blockquote><div><p>When i say in /etc/network/interfaces : iface eth0 inet dhcp , command &quot;/sbin/ifup eth0&quot; activates dhclient. <br />By default, dhclient broadcasts DHCPREQUEST-messages to all hosts. <br />But what if want to say which server dhclient sends it requests?</p></div></blockquote></div><p>Of course i meant DHCPDISCOVER , not DHCPREQUEST. <br />Maybe i&#039;ll try that &quot;server-name&quot; thing but somehow i doubt that&#039;s the thing that i&#039;m after.</p><p>And from these pages:</p><p><a href="https://manpages.org/etc-network-interfaces/5" rel="nofollow">https://manpages.org/etc-network-interfaces/5</a><br /><a href="https://manpages.org/etc-network-interfaces/5" rel="nofollow">https://manpages.org/etc-network-interfaces/5</a></p><p>i noticed the &quot;manual&quot; keyworḍ. Combining that with &quot;up&quot; or &quot;pre-up&quot; seems interesting. I could give commands that way. Commands like &quot;dhclient -s&quot;&#160; for example. But do i have to do something to the network interface before invoking dhclient?&#160; <br />I noticed, from /sbin/dhclient-script that there is this command called &quot;ip&quot;. It seems it can do many things.&#160; <br />Unfortunately i&#039;m not familiar with &quot;ip&quot; command, so some help would be appreciated,</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Mon, 25 Jul 2022 10:46:52 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36778#p36778</guid>
		</item>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36772#p36772</link>
			<description><![CDATA[<p>I&#039;m not exactly sure there&#039;s a keyword in dhclient.conf for what i want. server-name &quot;string&quot;; seems closest thing. I guess i can try that (tomorrow).</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Sun, 24 Jul 2022 20:24:34 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36772#p36772</guid>
		</item>
		<item>
			<title><![CDATA[Re: /etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36769#p36769</link>
			<description><![CDATA[<p>I think the option should be applied as per <a href="https://manpages.debian.org/bullseye/isc-dhcp-client/dhclient.conf.5.en.html" rel="nofollow">dhclient.conf(5)</a>.</p><p>Disclaimer: I don&#039;t use dhclient.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sun, 24 Jul 2022 19:49:22 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36769#p36769</guid>
		</item>
		<item>
			<title><![CDATA[/etc/network/interfaces vs dhclient -s]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=36768#p36768</link>
			<description><![CDATA[<p>When i say in /etc/network/interfaces : iface eth0 inet dhcp , command &quot;/sbin/ifup eth0&quot; activates dhclient. <br />By default, dhclient broadcasts DHCPDISCOVER-messages to all hosts(255.255.255.255). <br />But what if want to say which server dhclient sends it requests?<br />It is possible to say &quot;reject a.b.c.d/mask&quot; in /etc/dhcp/dhclient.conf but that&#039;s not what i mean.</p><p>Then i tried /sbin/dhclient --help:</p><p>Usage: dhclient [-4|-6] [-SNTPRI1dvrxi] [-nw] [-p &lt;port&gt;] [-D LL|LLT]<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [--dad-wait-time &lt;seconds&gt;] [--prefix-len-hint &lt;length&gt;]<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [--decline-wait-time &lt;seconds&gt;]<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [--address-prefix-len &lt;length&gt;]<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [-s server-addr] [-cf config-file]<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [-df duid-file] [-lf lease-file]<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [-pf pid-file] [--no-pid] [-e VAR=val]<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [-sf script-file] [interface]*<br />&#160; &#160; &#160; &#160;dhclient {--version|--help|-h}</p><p>it seems that &quot;-s&quot; - option is what i want.<br />But how i should edit /etc/network/interfaces so that &quot;-s server_ip&quot;-option goes to dhclient when i bring eth0 up with /sbin/ifup?<br />I guess &quot;pre-up &lt;command&gt;&quot; or &quot;up &lt;command&gt;&quot; are the things that i should add to /e/n/interfaces. But exactly what commands?<br />Should i bring eth0 up with temporary address by using &quot;ip&quot; command? And after that &quot;dhclient -s &lt;server_ip&gt;&quot; ? Or is dhclient enough?<br />I&#039;m not a completely newbie with computers or linux but haven&#039;t tried this kind of thing before.</p>]]></description>
			<author><![CDATA[dummy@example.com (nahkhiirmees)]]></author>
			<pubDate>Sun, 24 Jul 2022 19:40:35 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=36768#p36768</guid>
		</item>
	</channel>
</rss>
