<?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>debian &#8211; Giovanni F. Mazzeo De Santolo</title>
	<atom:link href="https://desantolo.com/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>https://desantolo.com</link>
	<description>That italian IT guy</description>
	<lastBuildDate>Sun, 27 Dec 2020 05:38:52 +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>LXC allow non-root users to bind to port 80 (couchpotato example)</title>
		<link>https://desantolo.com/2017/06/lxc-allow-non-root-users-to-bind-to-port-80-couchpotato-example/</link>
		
		<dc:creator><![CDATA[Giovanni]]></dc:creator>
		<pubDate>Thu, 29 Jun 2017 08:37:42 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxmox]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[authbind]]></category>
		<category><![CDATA[containers]]></category>
		<category><![CDATA[couchpotato]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://desantolo.com/?p=541</guid>

					<description><![CDATA[A follow-up to my last post dealing with unprivileged port access on linux containers. This time, I have a couchpotato container that I want to change its default port from 5050 to port 80, so that it is as simple &#8230; <a href="https://desantolo.com/2017/06/lxc-allow-non-root-users-to-bind-to-port-80-couchpotato-example/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>A follow-up to my last post dealing with unprivileged port access on linux containers.</p>
<p>This time, I have a couchpotato container that I want to change its default port from 5050 to port 80, so that it is as simple as http://mycouch/ to access from the local network.<br />
<span id="more-541"></span><br />
Since CouchPotato is a python script, my other method of whitelisting the binary won&#8217;t work, an alternative is to use <strong>authbind</strong> to get around this by granting a user/group privileges to bind to one of those restricted ports (non-root can&#8217;t bind to ports 1024 or less).</p>
<p><strong>Environment:</strong> LXC Container (Debian 9.0 Stretch) image, with couchpotato defaults running on port 5050 and systemd init script setup (couchpotato user is named gmedia)</p>
<p><code>#  groupadd -g 3200 gmedia</code><br />
<code># useradd -u 3200 -g gmedia -M gmedia</code><br />
<code># apt-get install authbind</code><br />
<code># touch /etc/authbind/byport/80</code><br />
<code># chown gmedia /etc/authbind/byport/80</code><br />
<code># chmod 500 /etc/authbind/byport/80</code></p>
<p>Now edit the startup settings (Exec/user/group):<br />
<strong><span style="color: #444444;"># nano /etc/systemd/system/couchpotato.service</span></strong></p>
<p>Should look something like this:</p>
<p><code>[Unit]</code><br />
<code>Description=CouchPotato application instance</code><br />
<code>After=network.target</code></p>
<p><code>[Service]</code><br />
<code>ExecStart=/usr/bin/authbind --deep /opt/CouchPotatoServer/CouchPotato.py</code><br />
<code>Type=simple</code><br />
<code>User=gmedia</code><br />
<code>Group=gmedia</code></p>
<p><code>[Install]</code><br />
<code>WantedBy=multi-user.target</code></p>
<p>Now its time to test:</p>
<p># systemctl daemon-reload<br />
# systemctl start couchpotato.service<br />
# systemctl status couchpotato.service</p>
<p>Confirm all is hunky dory.</p>
<p><code>root@couchpotato:~# systemctl status couchpotato.service</code><br />
<code>● couchpotato.service - CouchPotato application instance</code><br />
<code> Loaded: loaded (/etc/systemd/system/couchpotato.service; enabled; vendor preset: enabled)</code><br />
<code> Active: active (running) since Thu 2017-06-29 08:35:32 UTC; 2s ago</code><br />
<code> Main PID: 1203 (python)</code><br />
<code> Tasks: 9 (limit: 4915)</code><br />
<code> CGroup: /system.slice/couchpotato.service</code><br />
<code> └─1203 python /opt/CouchPotatoServer/CouchPotato.py</code></p>
<p><code>Jun 29 08:35:32 couchpotato systemd[1]: Started CouchPotato application instance.</code><br />
<code>root@couchpotato:~# lsof -i :80</code><br />
<code>COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME</code><br />
<code>python 1203 gmedia 49u IPv4 6008724 0t0 TCP *:http (LISTEN)</code><br />
<code>python 1203 gmedia 52u IPv4 6024843 0t0 TCP 192.168.200.140:http-&gt;192.168.200.5:56928 (ESTABLISHED)</code><br />
<code>root@couchpotato:~#</code></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">541</post-id>	</item>
		<item>
		<title>Allow non-root processes to bind to privileged (ports </title>
		<link>https://desantolo.com/2017/06/allow-non-root-processes-to-bind-to-privileged-ports/</link>
		
		<dc:creator><![CDATA[Giovanni]]></dc:creator>
		<pubDate>Wed, 28 Jun 2017 07:53:49 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[containers]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[proxmox]]></category>
		<guid isPermaLink="false">https://desantolo.com/?p=538</guid>

					<description><![CDATA[As I work on my homelab migration from FreeNAS into Linux containers, I need to move my freebsd jails to LXC. In *nix any usage of well-known ports (aka 1024 or less) requires special privileges or a kernel setting. In &#8230; <a href="https://desantolo.com/2017/06/allow-non-root-processes-to-bind-to-privileged-ports/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>As I work on my homelab migration from FreeNAS into Linux containers, I need to move my freebsd jails to LXC.</p>
<p>In *nix any usage of well-known ports (aka 1024 or less) requires special privileges or a kernel setting. In FreeBSD a simple sysctl net.inet.ip.portrange.reservedhigh =1 was enough to allow the BSD jail to use any port on the jail.</p>
<p>On LXC, I had to figure out how to do the same thing and its quite different. My environment is a debian stretch LXC container but should work on other linux versions.</p>
<p><code><strong># apt-get install libcap2-bin</strong></code><br />
<code><strong># setcap 'cap_net_bind_service=+ep' /usr/bin/transmission-daemon</strong></code></p>
<p>In the example above, the binary /usr/bin/transmission-daemon is now able to open any port, or port 80 http in my case all while running a service as a non-root user.</p>
<p>Hopefully these helps folks out there, the answer took some digging but I already had an idea on what was needed thanks to my FreeBSD experience in zones <img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">538</post-id>	</item>
		<item>
		<title>Troubleshooting networking issues after fresh install of proxmox VE 4.4</title>
		<link>https://desantolo.com/2017/02/troubleshooting-networking-issues-after-fresh-install-of-proxmox-ve-4-4/</link>
		
		<dc:creator><![CDATA[Giovanni]]></dc:creator>
		<pubDate>Fri, 10 Feb 2017 06:04:02 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxmox]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[proxmox]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<guid isPermaLink="false">https://desantolo.com/?p=504</guid>

					<description><![CDATA[Writing a quick troubleshooting guide and informative post to address an issue I came across when installing Proxmox VE 4.4 on two of my machines. On servers with more than two network interfaces Debian/Proxmox renames all interfaces and does not &#8230; <a href="https://desantolo.com/2017/02/troubleshooting-networking-issues-after-fresh-install-of-proxmox-ve-4-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Writing a quick troubleshooting guide and informative post to address an issue I came across when installing Proxmox VE 4.4 on two of my machines.</p>
<p>On servers with more than two network interfaces Debian/Proxmox renames all interfaces and does not properly detect eth0 as the on-board ethernet as many other linux flavors. This may cause a mild headache if you just installed Proxmox with static IP addresses using the installer and upon reboot you can&#8217;t access any network resources.<span id="more-504"></span></p>
<p>I already explained the cause and you could argue that on the Proxmox installer they could add a built-in network detection check to properly label eth0 as eth0 as the device is named in many other linux distros. That currently does not exist so I will walk you around the troubleshooting.</p>
<p>Upon reboot or first boot after the installation is complete:<br />
<strong># ip link</strong></p>
<p>The bridge interface (<strong>vmbr0</strong>) should read &#8220;<strong>NO-CARRIER</strong>, MULTICAST, UP&#8221; as well as &#8220;<strong>state down</strong>&#8221; a few words further to the left of the results.</p>
<p><strong># dmesg | grep eth</strong></p>
<p>Read the entries in the dmesg logs, it tells you the name of network interfaces on your system.</p>
<p>&#8220;<strong>NO-CARRIER</strong>&#8221; indicates it does not detect an uplink, the interface is configured but none of its bridge members have a network cable or connection being detected.</p>
<p>To fix this you will want to run the following commands:<br />
<strong># ifdown -a</strong><br />
<strong># vi /etc/network/interfaces</strong></p>
<p>By default the installer sets up &#8220;eth0&#8221; as your only bridge member since the network card numbering got setup differently, the logical name on proxmox for eth0 is actually eth2.</p>
<p><strong>Edit the single instance of eth0 with eth2</strong> &#8211; save the file and exit the editor.</p>
<p><strong># ifup -a</strong><br />
should try to bring back up your interfaces. Trying pinging your network gateway, it should be working now. Cheers.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">504</post-id>	</item>
	</channel>
</rss>
