<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/20578" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2019-03-01T02:40:53-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/20578</id>

		<entry>
		<author><name><![CDATA[KhashayaR]]></name></author>
		<updated>2019-03-01T02:40:53-04:00</updated>

		<published>2019-03-01T02:40:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107493#p107493</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107493#p107493"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107493#p107493"><![CDATA[
Thanks alot for your help, i will do as you advise and hopefully no more attack, <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9165">KhashayaR</a> — Fri Mar 01, 2019 2:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2019-02-28T10:54:17-04:00</updated>

		<published>2019-02-28T10:54:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107483#p107483</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107483#p107483"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107483#p107483"><![CDATA[
I get a lot of SSH brute-force attack attempts on my server (where authentication is done via a private key anyway), so it's no surprise to me that your server has been port scanned and now your telnet gets a lot of attention.<br><br>The best way to end with this pesky issue once and forever is to set the telnet host on your bot to the IP or lis of IP you trust. If you look at *.user (where * is what you set in eggdrop.conf file at <em class="text-italics">set userfile</em> line), for example LamestBot.user (in my case) you should see at the top of your user a line like this:<div class="codebox"><p>Code: </p><pre><code>--HOSTS -telnet!*@*</code></pre></div>that basically translates it will accept a telnet connection from anyone (the * behind @ means everyone). So, if you change that line for example to:<div class="codebox"><p>Code: </p><pre><code>--HOSTS -telnet!*@1.2.3.4</code></pre></div>then it will accept a telnet connection ONLY from 1.2.3.4, and any other IP connection is dropped.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Feb 28, 2019 10:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KhashayaR]]></name></author>
		<updated>2019-02-27T03:38:30-04:00</updated>

		<published>2019-02-27T03:38:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107478#p107478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107478#p107478"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107478#p107478"><![CDATA[
Hi Caesar, i hope all well, im still facing the same issue even after  running the script,   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused">  any idea what should i do. i can forward you the log , till now its been hramless however this will cuz the eggdrop to disconnect from irc server<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9165">KhashayaR</a> — Wed Feb 27, 2019 3:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2019-01-24T12:40:01-04:00</updated>

		<published>2019-01-24T12:40:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107373#p107373</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107373#p107373"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107373#p107373"><![CDATA[
The amount of attempts should be narrowed down a notch. Do you have a router before the server that you run the eggdrop from?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jan 24, 2019 12:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KhashayaR]]></name></author>
		<updated>2019-01-24T11:27:59-04:00</updated>

		<published>2019-01-24T11:27:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107372#p107372</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107372#p107372"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107372#p107372"><![CDATA[
Thank you very much <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> it work   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9165">KhashayaR</a> — Thu Jan 24, 2019 11:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2019-01-23T06:59:14-04:00</updated>

		<published>2019-01-23T06:59:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107365#p107365</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107365#p107365"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107365#p107365"><![CDATA[
You don't have it installed then. What Linux version do you have? On Debian (and all that come from it like Ubuntu and so on) all you have to do is:<div class="codebox"><p>Code: </p><pre><code>apt install ipset</code></pre></div>You didn't run only once the first two commands that are mandatory:<div class="codebox"><p>Code: </p><pre><code>ipset create blacklist hash:netiptables -I INPUT -m set --match-set blacklist src -j DROP </code></pre></div>before running the <em class="text-italics">badips.pl</em> script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Jan 23, 2019 6:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KhashayaR]]></name></author>
		<updated>2019-01-23T06:13:17-04:00</updated>

		<published>2019-01-23T06:13:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107364#p107364</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107364#p107364"/>
		<title type="html"><![CDATA[Can't exec &quot;ipset&quot;: No such file or directory at .]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107364#p107364"><![CDATA[
did i do something worng ?<br><br><strong class="text-strong">Can't exec "ipset": No such file or directory at ./badips.pl line 23, &lt;$data&gt; li                ne 9261.<br></strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9165">KhashayaR</a> — Wed Jan 23, 2019 6:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KhashayaR]]></name></author>
		<updated>2019-01-23T05:55:38-04:00</updated>

		<published>2019-01-23T05:55:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107363#p107363</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107363#p107363"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107363#p107363"><![CDATA[
<strong class="text-strong">Caesar</strong> Thanks you very much  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9165">KhashayaR</a> — Wed Jan 23, 2019 5:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2019-01-23T02:15:49-04:00</updated>

		<published>2019-01-23T02:15:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107361#p107361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107361#p107361"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107361#p107361"><![CDATA[
Then put the code into a file called for instance <em class="text-italics">badips.pl</em>, then <em class="text-italics">chmod a+x badips.pl</em> and run it with <em class="text-italics">./badips.pl</em><br><br>On, you need to execute the:<div class="codebox"><p>Code: </p><pre><code>ipset create blacklist hash:netiptables -I INPUT -m set --match-set blacklist src -j DROP </code></pre></div>only once to create the rules then can use <em class="text-italics">./badips.pl</em> on a daily basis.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Jan 23, 2019 2:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KhashayaR]]></name></author>
		<updated>2019-01-22T15:58:24-04:00</updated>

		<published>2019-01-22T15:58:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107359#p107359</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107359#p107359"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107359#p107359"><![CDATA[
<blockquote class="uncited"><div>The code I posted above is not for eggdrop, but something you would run on the server that is hosting the eggdrop, that is obviously if you have root access.</div></blockquote> Thanks <strong class="text-strong">Caesar,</strong> yes i do have root access.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9165">KhashayaR</a> — Tue Jan 22, 2019 3:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2019-01-22T15:54:10-04:00</updated>

		<published>2019-01-22T15:54:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107358#p107358</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107358#p107358"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107358#p107358"><![CDATA[
The code I posted above is not for eggdrop, but something you would run on the server that is hosting the eggdrop, that is obviously if you have root access.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jan 22, 2019 3:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KhashayaR]]></name></author>
		<updated>2019-01-22T15:46:14-04:00</updated>

		<published>2019-01-22T15:46:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107357#p107357</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107357#p107357"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107357#p107357"><![CDATA[
<strong class="text-strong">Caesar,</strong> Thank you, I guess all I need to do is figure out how to run the code you copied here  ,  I’m not sure if I have to copy it on /script? Or there is other way?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9165">KhashayaR</a> — Tue Jan 22, 2019 3:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2019-01-22T12:37:31-04:00</updated>

		<published>2019-01-22T12:37:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107356#p107356</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107356#p107356"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107356#p107356"><![CDATA[
I would at first change the telnet port to something else, something not common.<br><br>Instead of multiple iptables rules that in time will make the firewall run slower (I've read about this and can't be bothered to lookup the article) I would use ipset. For example:<div class="codebox"><p>Code: </p><pre><code>ipset create eggdrop hash:netiptables -I INPUT -m set --match-set eggdrop src -j DROP</code></pre></div>and each offending IP add to the list with:<div class="codebox"><p>Code: </p><pre><code>ipset add eggdrop &lt;ip&gt;</code></pre></div>Looked up some of the IP's that try to connect to your bot and they are listed for port scanning, brute-force access and so on on a few abuse websites like AbuseIPDB, Blocklist.de for example.<br><br>I made a Perl script to maintain a list updated once 24 hours from Blocklist.de for example for SSH:<div class="codebox"><p>Code: </p><pre><code>#!/usr/bin/perluse strict;use warnings;my $setup = {        file =&gt; 'blacklist.txt',        filter =&gt; 'blacklist',        url =&gt; 'https://lists.blocklist.de/lists/ssh.txt',};system(`wget -qO- $setup-&gt;{url} &gt; $setup-&gt;{file}`);my $file = $setup-&gt;{file};open my $data, $file or die "Could not open $file: $!";system(`ipset flush $setup-&gt;{filter}`);my $count = 0;my $total = 0;while (my $ip = &lt;$data&gt;)  {        if ($ip =~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/) {                `ipset add $setup-&gt;{filter} $ip`;                $count = $count + 1;        }        $total = $total + 1;}close $data;print "Filtered: $count/$total\n";</code></pre></div>the ipset table and iptables rules for this are:<div class="codebox"><p>Code: </p><pre><code>ipset create blacklist hash:netiptables -I INPUT -m set --match-set blacklist src -j DROP</code></pre></div>and just run that perl script every 24 hours via crontab to keep it updated. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Result:<div class="codebox"><p>Code: </p><pre><code>Filtered: 9012/9012</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jan 22, 2019 12:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2019-01-22T11:07:11-04:00</updated>

		<published>2019-01-22T11:07:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107354#p107354</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107354#p107354"/>
		<title type="html"><![CDATA[Re: unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107354#p107354"><![CDATA[
<blockquote class="uncited"><div><strong class="text-strong">Willyw</strong>, ... I used to add them to iptables via SSH <br>...<br></div></blockquote>That's probably even better.<br>Whatever works best / easiest for you.   <br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><blockquote class="uncited"><div> However, it’s a very difficult to keep tracking each ip address since I believe its they are all proxies, do you think such an action can harm the eggdrop?</div></blockquote>Tracking?   It's all in the bot's log, isn't it?<br><br>As for harm to the bot - not that I know of.<br><br>Who knows what they are trying to do ... ?   I suppose there could be a lot of different nefarious things....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Jan 22, 2019 11:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KhashayaR]]></name></author>
		<updated>2019-01-22T10:46:43-04:00</updated>

		<published>2019-01-22T10:46:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107353#p107353</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107353#p107353"/>
		<title type="html"><![CDATA[unauthorized Telnet connection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107353#p107353"><![CDATA[
<strong class="text-strong">Willyw</strong>, Thanks for your quick respond, I have done that, and it seems like they are now giving up, I used to add them to iptables via SSH <br>Exp: <br>sudo iptables -A INPUT -s 116.10.191. 121 -j DROP<br>To block 116.10.191.* addresses:<br>$ sudo iptables -A INPUT -s 116.10.191.0/24 -j DROP<br>To block 116.10.*.* addresses:<br>$ sudo iptables -A INPUT -s 116.10.0.0/16 -j DROP<br>To block 116.*.*.* addresses:<br>$ sudo iptables -A INPUT -s 116.0.0.0/8 -j DROP<br> However, it’s a very difficult to keep tracking each ip address since I believe its they are all proxies, do you think such an action can harm the eggdrop?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9165">KhashayaR</a> — Tue Jan 22, 2019 10:46 am</p><hr />
]]></content>
	</entry>
	</feed>
