<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.fnord.greeley.co.us/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Asterisk_Hardening</id>
	<title>Asterisk Hardening - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.fnord.greeley.co.us/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Asterisk_Hardening"/>
	<link rel="alternate" type="text/html" href="https://wiki.fnord.greeley.co.us/mediawiki/index.php?title=Asterisk_Hardening&amp;action=history"/>
	<updated>2026-05-06T13:30:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.fnord.greeley.co.us/mediawiki/index.php?title=Asterisk_Hardening&amp;diff=113&amp;oldid=prev</id>
		<title>Adj at 23:07, 17 February 2012</title>
		<link rel="alternate" type="text/html" href="https://wiki.fnord.greeley.co.us/mediawiki/index.php?title=Asterisk_Hardening&amp;diff=113&amp;oldid=prev"/>
		<updated>2012-02-17T23:07:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:07, 17 February 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; adj@sacredchao:/etc/asterisk$&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; adj@sacredchao:/etc/asterisk$&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here ends the first lesson.  Don&#039;t listen for network traffic.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here ends the first lesson.  Don&#039;t listen for network traffic&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.  The Internet is not a nice place&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:wikidiff2:1.12:old-112:rev-113:1.13.0 --&gt;
&lt;/table&gt;</summary>
		<author><name>Adj</name></author>
	</entry>
	<entry>
		<id>https://wiki.fnord.greeley.co.us/mediawiki/index.php?title=Asterisk_Hardening&amp;diff=112&amp;oldid=prev</id>
		<title>Adj: Created page with &quot;Asterisk (at least v1.8.8.x as packaged by Debian), is quite promiscuous, accepting network connections on all kinds of TCP and UDP sockets with a wildcard IP address:   adj@sacr…&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.fnord.greeley.co.us/mediawiki/index.php?title=Asterisk_Hardening&amp;diff=112&amp;oldid=prev"/>
		<updated>2012-02-17T23:07:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Asterisk (at least v1.8.8.x as packaged by Debian), is quite promiscuous, accepting network connections on all kinds of TCP and UDP sockets with a wildcard IP address:   adj@sacr…&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Asterisk (at least v1.8.8.x as packaged by Debian), is quite promiscuous, accepting network connections on all kinds of TCP and UDP sockets with a wildcard IP address:&lt;br /&gt;
&lt;br /&gt;
 adj@sacredchao:~$ sudo lsof -p 12888 | grep IP&lt;br /&gt;
 asterisk 12888 asterisk    6u  IPv4            1353742      0t0     TCP localhost:5038 (LISTEN)&lt;br /&gt;
 asterisk 12888 asterisk   13u  IPv4            1353748      0t0     UDP *:iax &lt;br /&gt;
 asterisk 12888 asterisk   14u  IPv4            1353756      0t0     UDP *:sip &lt;br /&gt;
 asterisk 12888 asterisk   15u  IPv4            1353757      0t0     UDP *:2727 &lt;br /&gt;
 asterisk 12888 asterisk   16u  IPv4            1353758      0t0     TCP *:cisco-sccp (LISTEN)&lt;br /&gt;
 asterisk 12888 asterisk   20u  IPv4            1353763      0t0     UDP *:4520 &lt;br /&gt;
 asterisk 12888 asterisk   22u  IPv4            1353764      0t0     UDP *:5000 &lt;br /&gt;
 adj@sacredchao:~$ &lt;br /&gt;
&lt;br /&gt;
This is a just-installed asterisk 1:1.8.8.2~dfsg-1~0.sacredchao.0.  No configuration has been done.  At all.  Disturbing, what?  Anyway, we only care about SIP here in Fnord-land, so we&amp;#039;re going to turn all that extra stuff off.  Applying this patch to /etc/asterisk/modules.conf has made it considerable less willing to talk:&lt;br /&gt;
 --- modules.conf.dpkg-dist      2011-04-23 12:48:34.000000000 -0600&lt;br /&gt;
 +++ modules.conf        2012-02-17 15:56:31.000000000 -0700&lt;br /&gt;
 @@ -65,6 +65,13 @@&lt;br /&gt;
  ;&lt;br /&gt;
  noload =&amp;gt; res_config_odbc.so&lt;br /&gt;
  noload =&amp;gt; res_config_pgsql.so&lt;br /&gt;
 +&lt;br /&gt;
 +; More stuff that should not be turned on by default:&lt;br /&gt;
 +noload =&amp;gt; chan_iax2.so&lt;br /&gt;
 +noload =&amp;gt; chan_mgcp.so&lt;br /&gt;
 +noload =&amp;gt; chan_skinny.so&lt;br /&gt;
 +noload =&amp;gt; chan_unistim.so&lt;br /&gt;
 +noload =&amp;gt; pbx_dundi.so&lt;br /&gt;
  ;&lt;br /&gt;
  ; Module names listed in &amp;quot;global&amp;quot; section will have symbols globally&lt;br /&gt;
  ; exported to modules loaded after them.&lt;br /&gt;
&lt;br /&gt;
Stop and re-start asterisk after this edit to have it take effect.  Here&amp;#039;s the lsof output after this change:&lt;br /&gt;
 adj@sacredchao:/etc/asterisk$ sudo lsof -p 13487 | grep IP&lt;br /&gt;
 asterisk 13487 asterisk    6u  IPv4            1354416      0t0     TCP localhost:5038 (LISTEN)&lt;br /&gt;
 asterisk 13487 asterisk   12u  IPv4            1354423      0t0     UDP *:sip &lt;br /&gt;
 adj@sacredchao:/etc/asterisk$&lt;br /&gt;
&lt;br /&gt;
The SIP port is still open to the world.  Here&amp;#039;s a patch to tighten it a bit:&lt;br /&gt;
 --- sip.conf.dpkg-dist  2012-02-17 15:28:25.000000000 -0700&lt;br /&gt;
 +++ sip.conf    2012-02-17 16:03:26.000000000 -0700&lt;br /&gt;
 @@ -164,7 +164,7 @@&lt;br /&gt;
  ; depends on the operating system. On systems using glibc, AAAA records are given&lt;br /&gt;
  ; priority.&lt;br /&gt;
  &lt;br /&gt;
 -udpbindaddr=0.0.0.0             ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)&lt;br /&gt;
 +udpbindaddr=172.16.0.1          ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)&lt;br /&gt;
                                  ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)&lt;br /&gt;
  &lt;br /&gt;
  ; When a dialog is started with another SIP endpoint, the other endpoint&lt;br /&gt;
&lt;br /&gt;
Again, restart asterisk when done.  New lsof output:&lt;br /&gt;
 adj@sacredchao:/etc/asterisk$ sudo lsof -p 14621 -n | grep IP&lt;br /&gt;
 asterisk 14621 asterisk    6u  IPv4            1358149      0t0     TCP 127.0.0.1:5038 (LISTEN)&lt;br /&gt;
 asterisk 14621 asterisk   12u  IPv4            1358153      0t0     UDP 172.16.0.1:sip &lt;br /&gt;
 adj@sacredchao:/etc/asterisk$&lt;br /&gt;
&lt;br /&gt;
Here ends the first lesson.  Don&amp;#039;t listen for network traffic.&lt;/div&gt;</summary>
		<author><name>Adj</name></author>
	</entry>
</feed>