OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • Firewall Alias (external) and VERY BIG table file.
« previous next »
  • Print
Pages: [1]

Author Topic: Firewall Alias (external) and VERY BIG table file.  (Read 4556 times)

ezraimanuel

  • Newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Firewall Alias (external) and VERY BIG table file.
« on: November 06, 2018, 10:07:50 pm »
Hello, i see Firewall alias that has type "external", what is it and how to use it? i see no documentation for it..

1 more thing... i have this list of blocked IPs which i want to load (I used to do this in FreeBSD using table <blockip> persist file "/path/to/file" ... containing more than 150K IPs with 2MB size... i tried to load it in opnsense and timeout from web browser..... is there anyway i can do this from terminal?

thanks!
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13936
  • Karma: 1208
    • View Profile
Re: Firewall Alias (external) and VERY BIG table file.
« Reply #1 on: November 06, 2018, 10:51:57 pm »
Hi,

External means you can fill it via API, won't be touched otherwise. There is no documentation, because it's an internal feature that you can use, but we cannot make guarantees about breaking its behaviour in the future.

IPv6 bogons are big, yes.

% ls -lah /usr/local/etc/bogons*
-rw-r--r--  1 root  wheel    48K Nov  3 12:40 /usr/local/etc/bogons
-rw-r--r--  1 root  wheel   132B Sep 23 10:24 /usr/local/etc/bogons.sample
-rw-r--r--  1 root  wheel   1.6M Nov  3 12:40 /usr/local/etc/bogonsv6
-rw-r--r--  1 root  wheel   860B Sep 23 10:24 /usr/local/etc/bogonsv6.sample

You can disable bogon usage under "Interfaces: [WAN]".


Cheers,
Franco
Logged

ezraimanuel

  • Newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: Firewall Alias (external) and VERY BIG table file.
« Reply #2 on: November 07, 2018, 08:07:55 am »
thank you for your reply :)

about "External means you can fill it via API", how can i do this? thanks :)
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13936
  • Karma: 1208
    • View Profile
Re: Firewall Alias (external) and VERY BIG table file.
« Reply #3 on: November 07, 2018, 12:11:28 pm »
Docs are pending on the alias endpoints. I am not sure if anyone will write a tutorial, but there is a powershell tool
that is/will be supporting it:

https://forum.opnsense.org/index.php?topic=6813.0

Docs link for future reference:

https://docs.opnsense.org/development/api.html

In addition to that, the Nginx-Plugin is using the external alias in its own code if you want to look for programmatic inspirations:

https://github.com/opnsense/plugins/tree/master/www/nginx


Cheers,
Franco
Logged

ezraimanuel

  • Newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: Firewall Alias (external) and VERY BIG table file.
« Reply #4 on: November 07, 2018, 02:53:07 pm »
thank you! i will look into it :)
Logged

ezraimanuel

  • Newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: Firewall Alias (external) and VERY BIG table file.
« Reply #5 on: November 07, 2018, 04:14:59 pm »
by the way,

https://repo.polkam.go.id/firehol/attacks.netset
https://repo.polkam.go.id/firehol/malware.netset

those are my list of backlisted IPs, when i try to load it as alias in OPNsense from web gui it always give me timeout... please try it adding it from web gui

in my old FreeBSD i just put those as table <tablename> persist file "/path/to/file" .. and it's done. (current OPN has no option to load alias from file, i think this is important)

PS: python2.7 bumped to 100% CPU usage if i add those into alias

thank you!
« Last Edit: November 07, 2018, 04:20:19 pm by ezraimanuel »
Logged

ezraimanuel

  • Newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: Firewall Alias (external) and VERY BIG table file.
« Reply #6 on: November 07, 2018, 04:52:41 pm »

Logged

AdSchellevis

  • Administrator
  • Hero Member
  • *****
  • Posts: 855
  • Karma: 166
    • View Profile
Re: Firewall Alias (external) and VERY BIG table file.
« Reply #7 on: November 08, 2018, 01:46:27 pm »
can you try https://github.com/opnsense/core/commit/08bd6c717751f3ce1c4b160fed7b747a5fa7da6f ?

Code: [Select]
opnsense-patch 08bd6c7

When deduplicating the retrieved addresses, the lookup was less performant it seemed.
Logged

ezraimanuel

  • Newbie
  • *
  • Posts: 10
  • Karma: 2
    • View Profile
Re: Firewall Alias (external) and VERY BIG table file.
« Reply #8 on: November 09, 2018, 06:50:05 am »
Quote from: AdSchellevis on November 08, 2018, 01:46:27 pm
can you try https://github.com/opnsense/core/commit/08bd6c717751f3ce1c4b160fed7b747a5fa7da6f ?

Code: [Select]
opnsense-patch 08bd6c7

When deduplicating the retrieved addresses, the lookup was less performant it seemed.

hello, I got this instead:

nothing shown on Type and any other selection fields. i already restart the webgui
Logged

AdSchellevis

  • Administrator
  • Hero Member
  • *****
  • Posts: 855
  • Karma: 166
    • View Profile
Re: Firewall Alias (external) and VERY BIG table file.
« Reply #9 on: November 09, 2018, 09:03:45 am »
Can't be related, the code in the patch has no relation the the ui. You can inspect the request/response in your browser, maybe that sheds some light on your issue.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.7 Legacy Series »
  • Firewall Alias (external) and VERY BIG table file.
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2