<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[optimize config with GeoIP Alias]]></title><description><![CDATA[<p dir="auto">On a Netgate 2100 we run pfblockerng-devel-3.2.0_18</p>
<p dir="auto">I registered at Maxmind and defined a geoip-alias containing only the IPs of "DACH" = Austria, Germany, Switzerland.</p>
<p dir="auto">The customer still runs legacy portforwardings for various server machines:</p>
<p dir="auto">their clients access server vms via ~30 separate ports on WAN, forwarded to RDP on the target machines.</p>
<p dir="auto">Yes, unsafe and bad.</p>
<p dir="auto">I suggested to at least limit access to these ports to these 3 countries as we are located in AT, to avoid attacks from elsewhere.</p>
<p dir="auto">Before anyone suggests this: they are in the process of switching all the customers to VPN-access already.</p>
<p dir="auto">So we have NAT-rules like:</p>
<p dir="auto">Source: geoip-alias "DACH"<br />
Target: WAN-IP<br />
Port: someport<br />
forwarded to: internal IP, Port 3389 (MS RDP)</p>
<p dir="auto">works so far</p>
<p dir="auto">It only slows down the WebGUI etc</p>
<p dir="auto">I think of optimizing this ... maybe better define a list of all the exposed ports as Alias and add a single FW-rule above the NAT-rules ( under Firewall-Rules?) that allows traffic to these ports from the GeoIP-list only? And remove the GeoIP-list from the various NAT-rules?</p>
<p dir="auto">hints welcome, I am sure this can be done much more efficient.<br />
thanks</p>
]]></description><link>https://forum.netgate.com/topic/190436/optimize-config-with-geoip-alias</link><generator>RSS for Node</generator><lastBuildDate>Sat, 09 May 2026 14:20:37 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/190436.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Oct 2024 10:17:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Fri, 18 Oct 2024 10:11:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johnpoz">@<bdi>johnpoz</bdi></a> I get back here tmrw ... it's late already in my timezone.<br />
Thanks so far!</p>
<p dir="auto">edit: currently sick since monday ... I'll get back here asap</p>
]]></description><link>https://forum.netgate.com/post/1187458</link><guid isPermaLink="true">https://forum.netgate.com/post/1187458</guid><dc:creator><![CDATA[sgw]]></dc:creator><pubDate>Fri, 18 Oct 2024 10:11:35 GMT</pubDate></item><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Tue, 08 Oct 2024 14:33:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgw">@<bdi>sgw</bdi></a> well that doesn't seem all that crazy.. But you do have something going on for sure if takes you 20-30 seconds to call up a rule.. Does that delay happen when just a normal rule or nat without any aliases in it?</p>
<p dir="auto">If I go to edit this port forward</p>
<p dir="auto"><img src="/assets/uploads/files/1728397989709-edit.jpg" alt="edit.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Its pretty much instant.</p>
]]></description><link>https://forum.netgate.com/post/1187429</link><guid isPermaLink="true">https://forum.netgate.com/post/1187429</guid><dc:creator><![CDATA[johnpoz]]></dc:creator><pubDate>Tue, 08 Oct 2024 14:33:17 GMT</pubDate></item><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Tue, 08 Oct 2024 14:19:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johnpoz">@<bdi>johnpoz</bdi></a></p>
<p dir="auto"><img src="/assets/uploads/files/1728397184508-59347156-7be5-44cd-84d7-f66166a8d006-image.png" alt="59347156-7be5-44cd-84d7-f66166a8d006-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.netgate.com/post/1187428</link><guid isPermaLink="true">https://forum.netgate.com/post/1187428</guid><dc:creator><![CDATA[sgw]]></dc:creator><pubDate>Tue, 08 Oct 2024 14:19:58 GMT</pubDate></item><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Tue, 08 Oct 2024 14:16:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgw">@<bdi>sgw</bdi></a> said in <a href="/post/1187417">optimize config with GeoIP Alias</a>:</p>
<blockquote>
<p dir="auto">and 50-70% CPU.</p>
</blockquote>
<p dir="auto">That seems high for the box doing nothing but routing and firewalling.. How many states do you have currently, how much traffic is being routed?</p>
<p dir="auto">But yeah if your cpu is running at 50 some % - interaction with the gui in any form might be a little bogged down.</p>
<p dir="auto">Can you post up your cpu monitoring graph.. Example here is mine over 2 days,  not showing the interrupts and processes so can see cpu</p>
<p dir="auto"><img src="/assets/uploads/files/1728396962649-graph.jpg" alt="graph.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.netgate.com/post/1187425</link><guid isPermaLink="true">https://forum.netgate.com/post/1187425</guid><dc:creator><![CDATA[johnpoz]]></dc:creator><pubDate>Tue, 08 Oct 2024 14:16:09 GMT</pubDate></item><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Tue, 08 Oct 2024 13:36:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nogbadthebad">@<bdi>NogBadTheBad</bdi></a> this helps a lot, thanks!</p>
<p dir="auto">applied the patch and rebuilt the geoip lists as mentioned also</p>
<p dir="auto">looks better now</p>
]]></description><link>https://forum.netgate.com/post/1187422</link><guid isPermaLink="true">https://forum.netgate.com/post/1187422</guid><dc:creator><![CDATA[sgw]]></dc:creator><pubDate>Tue, 08 Oct 2024 13:36:11 GMT</pubDate></item><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Tue, 08 Oct 2024 13:11:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgw">@<bdi>sgw</bdi></a> There is an option in <strong>System</strong> -&gt; <strong>General Setup</strong> to disable <strong>Alias Popups</strong></p>
]]></description><link>https://forum.netgate.com/post/1187420</link><guid isPermaLink="true">https://forum.netgate.com/post/1187420</guid><dc:creator><![CDATA[NogBadTheBad]]></dc:creator><pubDate>Tue, 08 Oct 2024 13:11:33 GMT</pubDate></item><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Tue, 08 Oct 2024 12:59:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johnpoz">@<bdi>johnpoz</bdi></a></p>
<p dir="auto">when I click Firewall - NAT it takes around 25-30 seconds to open.<br />
This might be longer with a cold browser cache, I am not sure.</p>
<p dir="auto">The mouseover shows 10k lines "only" ;-)  ... unsure how to see how many lines the alias really contains.</p>
<p dir="auto">The admin there was complaining, he edited a lot of the NAT entries yesterday and it took him a lot of time.</p>
<p dir="auto">Maybe there other issues hidden.</p>
<p dir="auto">The alias is of type "Alias Native" and updated once a day only, if that is relevant.</p>
<p dir="auto"><img src="/assets/uploads/files/1728391313845-540cc221-9a97-4e79-9545-067f81caa4a2-image.png" alt="540cc221-9a97-4e79-9545-067f81caa4a2-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I might disable this restriction for some NAT-rules to test.</p>
<p dir="auto">That's why I thought it might be more clever to filter ONCE for GeoIP on top and not for each NAT-rule in detail.</p>
<p dir="auto">Or doesn't that make a difference in the overall load?</p>
<p dir="auto">Remember: netgate-2100</p>
<p dir="auto">... right now 22% of memory used, that's very ok. and 50-70% CPU.</p>
<p dir="auto">That box might be too small anyway, there are ~20 ovpn-clients also connected all day long (I should mention this, sry). We consider upgrading hardware anyway for even more ovpn-connections (while getting rid of those legacy port-fwds).</p>
<p dir="auto">EDIT: applied the patch from https://forum.netgate.com/post/1187377 now, checking things. thanks so far!</p>
]]></description><link>https://forum.netgate.com/post/1187417</link><guid isPermaLink="true">https://forum.netgate.com/post/1187417</guid><dc:creator><![CDATA[sgw]]></dc:creator><pubDate>Tue, 08 Oct 2024 12:59:09 GMT</pubDate></item><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Tue, 08 Oct 2024 12:16:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgw">@<bdi>sgw</bdi></a> I have never seen such a slow down.. I can call up a table that as 147k entries and it pops..</p>
<p dir="auto">if I mouse over one of my aliases with over 120k entries in it - the mouse pop up is pretty much instant</p>
<p dir="auto"><img src="/assets/uploads/files/1728389055619-instant.jpg" alt="instant.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Do your aliases have millions and millions of entries?</p>
<p dir="auto">Those tables are not populated on the fly.. They get updated/populated on a schedule, native aliases that resolve stuff are like every 5 minutes.. A table of Ips that pfblock downloads will be updated per the schedule you setup in pfblocker..</p>
<p dir="auto">If you mouse over one of your aliases and it take a long time to pop up, you got something else going on.  There was some issues with pfblocker consuming large amounts of cpu, but I thought that was corrected?</p>
<p dir="auto"><a href="https://forum.netgate.com/topic/190240/pfblockerng_devel-commit-reverse">https://forum.netgate.com/topic/190240/pfblockerng_devel-commit-reverse</a></p>
]]></description><link>https://forum.netgate.com/post/1187413</link><guid isPermaLink="true">https://forum.netgate.com/post/1187413</guid><dc:creator><![CDATA[johnpoz]]></dc:creator><pubDate>Tue, 08 Oct 2024 12:16:15 GMT</pubDate></item><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Tue, 08 Oct 2024 11:24:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/johnpoz">@<bdi>johnpoz</bdi></a> well, it's slow ;-)</p>
<p dir="auto">Editing NAT-rules takes a long time, load is high.<br />
I assume generating the IP-lists for the mouse-overs takes time or so.<br />
Surfing is OK, the routing and firewalling seems not to be slowed down (much ..?).</p>
]]></description><link>https://forum.netgate.com/post/1187410</link><guid isPermaLink="true">https://forum.netgate.com/post/1187410</guid><dc:creator><![CDATA[sgw]]></dc:creator><pubDate>Tue, 08 Oct 2024 11:24:51 GMT</pubDate></item><item><title><![CDATA[Reply to optimize config with GeoIP Alias on Tue, 08 Oct 2024 10:36:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgw">@<bdi>sgw</bdi></a> said in <a href="/post/1187404">optimize config with GeoIP Alias</a>:</p>
<blockquote>
<p dir="auto">It only slows down the WebGUI etc</p>
</blockquote>
<p dir="auto">why would you think that would slow down the web gui?</p>
]]></description><link>https://forum.netgate.com/post/1187405</link><guid isPermaLink="true">https://forum.netgate.com/post/1187405</guid><dc:creator><![CDATA[johnpoz]]></dc:creator><pubDate>Tue, 08 Oct 2024 10:36:14 GMT</pubDate></item></channel></rss>