<?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/20810" />

	<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>2020-07-16T03:55:23-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-07-16T03:55:23-04:00</updated>

		<published>2020-07-16T03:55:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108742#p108742</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108742#p108742"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108742#p108742"><![CDATA[
If your server is on Linux I would go with a different approach: firewall.<br><br>I would first create an IP set with <em class="text-italics">ipset</em> (replace blacklist with whatever you want):<div class="codebox"><p>Code: </p><pre><code>ipset create blacklist hash:net</code></pre></div>tell <em class="text-italics">iptables</em> to drop any connection from any IP that is in this <em class="text-italics">blacklist</em> set:<div class="codebox"><p>Code: </p><pre><code>iptables -I PREROUTING -t raw -m set --match-set blacklist src,dst -j DROP</code></pre></div>and populate the <em class="text-italics">blacklist</em> with data by telling it to flush previous (if any) data and load stuff from a text file:<div class="codebox"><p>Code: </p><pre><code>ipset flush blacklistipset restore -! &lt; blacklist.txt</code></pre></div>The blacklist.txt file has to be in this format:<div class="codebox"><p>Code: </p><pre><code>create blacklist hash:net family inet hashsize 8192 maxelem 65536add badips x.x.x.xadd badips x.x.x.xadd badips x.x.x.xand so on</code></pre></div>I got something similar (<a href="https://github.com/grumpytm/SSH-Bruteblock" class="postlink">repo</a> on Github) for script kiddies that keep on trying to brute-force their way in my server via the SSH service.<br><br>If you don't want to use this and want to stick with an eggdrop then I would proly use something like:<div class="codebox"><p>Code: </p><pre><code>proc lookup {str} {set match 0set fh [open "blacklist.txt" "r"]set data [read -nonewline $fh]close $fhforeach line $data {if {[string equal $line $str]} {incr matchbreak}}return $match}</code></pre></div>and trigger the glines when and if needed.<div class="codebox"><p>Code: </p><pre><code>bind join * join:checkproc join:check {nick uhost hand chan} {scan $uhost {%[^@]@%s} user hostif {[lookup $host]} {# add the gline line}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jul 16, 2020 3:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-07-16T02:39:34-04:00</updated>

		<published>2020-07-16T02:39:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108741#p108741</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108741#p108741"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108741#p108741"><![CDATA[
<blockquote class="uncited"><div>Also, as you said, the UnrealIRCD ban blocks would be hectic to put all the ips creating the block for each. Or, is there a way to make the UnrealIRCD ban block read the list?<br><br>I really thought Eggdrop could do this task at ease as it is one of the powerful IRC bot I have seen so far.</div></blockquote>If you have a file with all IPs, you can simply modify it with a good text editor (as notepad++ or pspad), or sed, to create an unrealircd comprehensive file that you'll include in your conf.<br>Just replace:<div class="codebox"><p>Code: </p><pre><code>^(.*)$</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>ban user { mask *@$1; reason "Denied IP"; };</code></pre></div>(note that it may be $1 or \1 depending on the editor you use).<br><br>If you want to manage it with eggdrop:<div class="codebox"><p>Code: </p><pre><code>set fi [open "ips.txt" "r"]set ips [read -nonewline $fi]close $fiforeach ip [split $ips "\n"] {   putserv "gzline *@$ip +0 :Denied IP"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Jul 16, 2020 2:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-07-15T20:38:06-04:00</updated>

		<published>2020-07-15T20:38:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108737#p108737</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108737#p108737"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108737#p108737"><![CDATA[
Did you try using the options of the unrealircd config ?<br><br>Not doubting you or anything, but just saying there is some handy stuff in there  <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=12849">ComputerTech</a> — Wed Jul 15, 2020 8:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TimeRider]]></name></author>
		<updated>2020-07-15T20:01:20-04:00</updated>

		<published>2020-07-15T20:01:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108736#p108736</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108736#p108736"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108736#p108736"><![CDATA[
Finally, my thread got some replies.<br><br>Thanks simo, That's the right user connecting syntax (ssl and non-ssl) for UnrealIRCD.<br><br>caesar: Actually someone has really abused my IRC server using VPNs. It's really getting in the nerves.<br><br>CrazyCat: I went through that discussion too. It was not much of help as the module requested was not made. Also, as you said, the UnrealIRCD ban blocks would be hectic to put all the ips creating the block for each. Or, is there a way to make the UnrealIRCD ban block read the list?<br><br>I really thought Eggdrop could do this task at ease as it is one of the powerful IRC bot I have seen so far.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12879">TimeRider</a> — Wed Jul 15, 2020 8:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-07-10T01:57:57-04:00</updated>

		<published>2020-07-10T01:57:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108707#p108707</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108707#p108707"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108707#p108707"><![CDATA[
We had a discussion in urealircd forum concerning VPN: <a href="https://forums.unrealircd.org/viewtopic.php?f=54&amp;t=8970" class="postlink">https://forums.unrealircd.org/viewtopic.php?f=54&amp;t=8970</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Fri Jul 10, 2020 1:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-07-10T00:43:20-04:00</updated>

		<published>2020-07-10T00:43:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108704#p108704</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108704#p108704"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108704#p108704"><![CDATA[
Well, the role of the VPN is to make the person behind it be somewhat anonymous, so on your server it could look like someone nice or some prick that's in for some trouble. Until he/she takes the first action you can't really tell who's who.<br><br>So, bottom line is that if you get too much abuse from the same VPN provider then just gline it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jul 10, 2020 12:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-07-09T12:15:32-04:00</updated>

		<published>2020-07-09T12:15:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108697#p108697</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108697#p108697"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108697#p108697"><![CDATA[
that was the first thing i thought of caesar but the thing is there isnt such a monitoring tool yet  for vpn monitoring else of course that would be prefered as crazycat already mentioned there is only the usual dnsbl monitoring wich doesnt including vpn or not by design anyway<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Jul 09, 2020 12:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-07-09T09:29:19-04:00</updated>

		<published>2020-07-09T09:29:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108696#p108696</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108696#p108696"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108696#p108696"><![CDATA[
Ah, then CrazyCat is right. Should do this on the server end via a module or something than rely on a bot that reads a text file each time someone connects.<br><br>Can't you recommend some modules simo?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jul 09, 2020 9:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2020-07-09T08:48:50-04:00</updated>

		<published>2020-07-09T08:48:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108695#p108695</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108695#p108695"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108695#p108695"><![CDATA[
its unreal5 caesar<br><br>syntax is:<br><br>for ssl<br> *** Client connecting: NICK (IDENT@HOST) [IP] {clients} [secure ECDHE-RSA-AES256-GCM-SHA384]<br><br>for non ssl<br> *** Client connecting: NICK (IDENT@HOST) [IP] {clients}<br><br><br>there is another thing ive seen his list it also has cidr ranges<br><br>im not sure how that would compare against connecting IPS wich are normal IPS<br><br>he asked me to help basically he wants to decrease the ammount of vpn ips used to connect as they are mainly  used for abuse<br><br>for example:<br><br>for ipv6:<br>2a0a:5ec0::/29<br><br>for ipv4:<br>2.56.16.0/22<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Thu Jul 09, 2020 8:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-07-09T00:44:15-04:00</updated>

		<published>2020-07-09T00:44:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108692#p108692</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108692#p108692"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108692#p108692"><![CDATA[
Bad idea imho.<br>Unrealircd can manage that directly with the ban blocks, it will be more efficient.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Jul 09, 2020 12:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-07-09T00:43:37-04:00</updated>

		<published>2020-07-09T00:43:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108691#p108691</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108691#p108691"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108691#p108691"><![CDATA[
Post an example of an user connecting to the network to see the syntax.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jul 09, 2020 12:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TimeRider]]></name></author>
		<updated>2020-07-08T18:41:57-04:00</updated>

		<published>2020-07-08T18:41:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108690#p108690</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108690#p108690"/>
		<title type="html"><![CDATA[Ban or gline/kline users connecting from IPs in the list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108690#p108690"><![CDATA[
Hello everyone, I have a huge list of IPs in .txt format that I would like to be blocked(gline/kline) in my Unrealircd server by eggdrop. So, basically I want a script where the eggdrop would oper up and see/scan if the user is connecting from the IPs in the list (ips.txt). <br><br>Can someone help me into this?<br><br>Thank you!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12879">TimeRider</a> — Wed Jul 08, 2020 6:41 pm</p><hr />
]]></content>
	</entry>
	</feed>
