<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dhclient &#8211; Giovanni F. Mazzeo De Santolo</title>
	<atom:link href="https://desantolo.com/tag/dhclient/feed/" rel="self" type="application/rss+xml" />
	<link>https://desantolo.com</link>
	<description>That italian IT guy</description>
	<lastBuildDate>Sun, 11 Apr 2021 08:33:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
<site xmlns="com-wordpress:feed-additions:1">123042357</site>	<item>
		<title>Linux IPv6 command cheatsheet</title>
		<link>https://desantolo.com/2021/03/linux-ipv6-command-cheatsheet/</link>
					<comments>https://desantolo.com/2021/03/linux-ipv6-command-cheatsheet/#respond</comments>
		
		<dc:creator><![CDATA[Giovanni]]></dc:creator>
		<pubDate>Fri, 05 Mar 2021 05:02:14 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[dhclient]]></category>
		<category><![CDATA[ip route]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netstat]]></category>
		<guid isPermaLink="false">https://desantolo.com/?p=596</guid>

					<description><![CDATA[Good articles about IPv6: IPv6 range blocks IPv6 unicast, anycast, multicast &#8211; well known addresses. Troubleshooting tools: IPv6 ping from multiple locations. Bonus section &#8216;ufw&#8217; firewall Check status of firewall and enable or disable.# ufw status# ufw enable# ufw disable &#8230; <a href="https://desantolo.com/2021/03/linux-ipv6-command-cheatsheet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[
<p>This post is intended to be a quick note to self on linux IPv6 commands, for quick reference when needed.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>



<pre class="wp-block-code"><code># Find the route decision for a given address.
ip route get 2a00:1450:4001:820::200e

ip -6 route
route -A inet6 (apt-get install net-tools) # equivalent to netstat -rn -A inet6
netstat -A inet6 -rn
netstat -r
ip -6 route show table 51820
ip -6 neigh
ip -6 neigh show proxy

# DHCPv6 release / renew
dhclient -6 -r ens18
dhclient -6 ens18

# Flush IPv6 neighbors cache
ip -family inet6 neigh flush any

# Find the route decision for a given address.
ip route get 2a00:1450:4001:820::200e

# Request a router advertisement (apt-get install -y ndisc6)
rdisc6 eth0

# Perform a Neighbor Solicitation (arp IPv4 equivalent) (apt-get install -y ndisc6)
ndisc6 2001:db8::42 eth0

# ping multicast address to have all link-local hosts to respond.
ping ff02::1%eth0</code></pre>



<p>Good articles about IPv6:</p>
<ul>
<li><a href="https://www.mediawiki.org/wiki/Help:Range_blocks/IPv6">IPv6 range</a> blocks</li>
<li><a href="https://menandmice.com/blog/ipv6-reference-multicast">IPv6 unicast, anycast, multicast</a> &#8211; well known addresses.</li>
</ul>
<p>Troubleshooting tools:</p>
<ul>
<li><a href="https://tools.keycdn.com/ipv6-ping">IPv6 ping</a> from multiple locations.</li>
</ul>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<h2 class="wp-block-heading">Bonus section &#8216;ufw&#8217; firewall</h2>



<p>Check status of firewall and enable or disable.<br># ufw status<br># ufw enable<br># ufw disable</p>



<p>View firewall rules and number to delete a specific rule.<br># ufw status verbose<br># ufw status numbered</p>



<p>Delete a firewall rule (from number of last cmd)<br># ufw delete 12</p>



<p>Rules needed to allow IPv6 routing via wireguard to endpoint (no iptables forwarding would be needed on IPv6 as the other peer carries the public IP &#8211; they also should implement a firewall before using the below command!)<br># ufw route allow in on eth0 out on wghub to 2602:xxx:730b:xxx:cafe::12</p>



<p>IPv4 firewall and routing rule to open Plex Media Server port 32400 and internal IPv4 space of wireguard peer.<br># ufw allow in on eth0 out on wghub to 10.100.100.11 port 32400<br># ufw route allow in on eth0 out on wghub to 10.100.100.11 port 32400</p>



<p>Add rule and get logs for matches of that rule:<br># ufw allow log proto any from any to 192.168.1.x</p>



<p>View logs:<br># tail -f /var/log/ufw.log</p>



<h3 class="wp-block-heading">Extra bonus iptables NAT forwarding</h3>



<p>On VPS (public endpoint) forward IPv4 traffic on tcp/32400 to wireguard peer. (recall IPv6 doesn&#8217;t need a rule)<br># iptables -A PREROUTING -t nat -i eth0 -p tcp &#8211;dport 32400 -j DNAT &#8211;to 10.100.100.11:32400</p>



<h3 class="wp-block-heading">Test your port forwards</h3>



<p>For IPv6 I use:<br><a href="http://www.ipv6scanner.com/cgi-bin/main.py">http://www.ipv6scanner.com/cgi-bin/main.py </a></p>



<p>For IPv4:<br><a href="https://www.yougetsignal.com/tools/open-ports/">https://www.yougetsignal.com/tools/open-ports/</a><br></p>
</div>
</div>
</div>
</div>
</div></div>
</div>
</div>


]]></content:encoded>
					
					<wfw:commentRss>https://desantolo.com/2021/03/linux-ipv6-command-cheatsheet/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">596</post-id>	</item>
	</channel>
</rss>
