What's new

Aegis aegis: a firewall blocklist

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I am finalizing an update with a lot of optimizations, better logging (using /var/log instead of dmesg), and with a really nice html page. I will publish the update in a few days or weeks.


Wow, what great news. Cant wait for the html-page! When it comes to optimizations I don't know how you do that, it is doing miracles already:)

It so fun to follow your projects here and see them evolve from what I deem as perfection, to be proven wrong all the time, to see it can even be made better by you authors.
 
1.2.5 is available.
Code:
aegis clean
aegis upgrade
aegis restart

Then to install Web Companion (the Web interface), do:
Code:
aegis web -install
Then just go to: http://routerlogin.net/bolemo/aegis.htm
Et voilà :)

Web Companion allows to see status, send some commands like update, restart and clean, and to watch log.
In the log view, click an IP to have info, and a port to open a page with port info.
Web Companion also allows to upgrade aegis if a new version is available: a red UPGRADE tab will show up when a new version is available.

Web Companion does not allow to edit lists yet.

Web Companion is optional. If you don’t install it, aegis upgrades will be done just on Aegis Core (the actual aegis).
If you install it, Web Companion will automatically be upgraded at the same time than Aegis Core.

To install it just do: aegis web -install
To remove, just do: aegis web-remove
INFO: the -html option does not exists anymore.

Other improvements are new optimizations and new engine not restarting the internal firewall unless you use restart.
The aegis log is prettier and has a -lines=N option to show the last N lines.

Enjoy !
 
Thanks for update.This is what I get

Upgrading:
- Version installed: 1.1.4
- Version found: 1.2.5
? Do you want to upgrade from 1.1.4 to 1.2.5 (y/n)? y

- Downloading:
/tmp/aegis.dl 100%[===================>] 55.77K --.-KB/s in 0.01s
- Script installed to /opt/bolemo/scripts/aegis
root@R7800:/$
root@R7800:/$
root@R7800:/$ aegis restart
/usr/bin/aegis: source: 6: Can't open /root/.profile
root@R7800:/$
root@R7800:/$ aegis web -install
/usr/bin/aegis: source: 6: Can't open /root/.profile
root@R7800:/$
root@R7800:/$ aegis restart
/usr/bin/aegis: source: 6: Can't open /root/.profile
root@R7800:/$
 
v1.2.6
Corrected bug reported by @jrbmw
 
root@R9000:/$ aegis clean
/bin/ash: aegis: Input/output error
root@R9000:/$

That’s before the upgrade? So with version 1.4.1?
Is aegis info working for example?

If v1.4.1, skip clean and just do aegis upgrade first, then try aegis restart.
 
OK, having a web interface issue.
Some of the decorations display but the meat of the data on both STATUS & LOG is:

Error loading status: code 404
 
Immagine.jpg
1Immagine.jpg
 
  • Like
Reactions: KW.
just upgraded successfully.

But it did take me two attempts.

I copied all 3 lines from the instruction at once and pasted them to the console.
But probably somehow, the 3rd line was taken as part of the input for the y/n question.
Because I did type y + enter, but then I was back at the prompt and still again had to give the aegis restart command.
And upon doublechecking with aegis status, I noticed it hadn't actually upgraded.

Then I retried line by line and then it went oke.

Code:
root@R7800:~$ aegis clean
root@R7800:~$ aegis upgrade
Upgrading:
- Version installed: 1.1.4
- Version found: 1.2.6                    
? Do you want to upgrade from 1.1.4 to 1.2.6 (y/n)? y
root@R7800:~$ aegis restart
root@R7800:~$ aegis status
Status:
- 'aegis' version: 1.1.4
- 'iprange' is installed: iprange 1.0.4
- 'aegis' is set and active for WAN interface (brwan) and VPN tunnel (tun21).
- Filtering 619548591 IP adresses.
- Bypassing 2 IP adresses.
- WAN gateway IP range does not need to be bypassed.
- Logging is on.
root@R7800:~$ aegis clean
root@R7800:~$ aegis upgrade
Upgrading:
- Version installed: 1.1.4
- Version found: 1.2.6                    
? Do you want to upgrade from 1.1.4 to 1.2.6 (y/n)? y
- Downloading:
/tmp/aegis.dl                                100%[============================================================================================>]  55.77K  --.-KB/s    in 0.02s   
- Script installed to /opt/bolemo/scripts/aegis
root@R7800:~$ aegis restart
root@R7800:~$ aegis status
Status:
- 'aegis' is set and active for WAN interface (brwan) and VPN tunnel (tun21).
- Filtering 619548591 IP adresses.
- Bypassing 2 IP adresses.



I can no longer test this, but perhaps this minor issue could be worked around by using this oneliner for the upgrade: ??
Code:
aegis clean && aegis upgrade && aegis restart
 
Also tried the web function and also getting the 404

http://routerlogin.net/bolemo/cgi-bin/aegis_web.cgi is missing.
(also /opt/bolemo/www/cgi-bin/aegis_web.cgi is missing)


and the web -install function could use some additional checks, before mv or mkdir:
(probably the cause of the above)

Code:
root@R7800:~$ aegis web -install
- Downloading Web Companion:
/tmp/aegis.dl                                100%[============================================================================================>]  16.90K  --.-KB/s    in 0.01s  
- Web Companion htm file installed to /opt/bolemo/www/aegis.htm
/tmp/aegis.dl                                100%[============================================================================================>]  14.32K  --.-KB/s    in 0.01s  
mv: cannot rename '/tmp/aegis.dl': No such file or directory
chmod: /opt/bolemo/www/cgi-bin/aegis_web.cgi: No such file or directory
- Web Companion cgi file installed to /opt/bolemo/www/cgi-bin/aegis_web.cgi
mkdir: cannot create directory '/opt/bolemo/www': File exists
- Web Companion paths were repaired.
 
just upgraded successfully.

But it did take me two attempts.

I copied all 3 lines from the instruction at once and pasted them to the console.
But probably somehow, the 3rd line was taken as part of the input for the y/n question.
Because I did type y + enter, but then I was back at the prompt and still again had to give the aegis restart command.
And upon doublechecking with aegis status, I noticed it hadn't actually upgraded.

Then I retried line by line and then it went oke.

Code:
root@R7800:~$ aegis clean
root@R7800:~$ aegis upgrade
Upgrading:
- Version installed: 1.1.4
- Version found: 1.2.6                   
? Do you want to upgrade from 1.1.4 to 1.2.6 (y/n)? y
root@R7800:~$ aegis restart
root@R7800:~$ aegis status
Status:
- 'aegis' version: 1.1.4
- 'iprange' is installed: iprange 1.0.4
- 'aegis' is set and active for WAN interface (brwan) and VPN tunnel (tun21).
- Filtering 619548591 IP adresses.
- Bypassing 2 IP adresses.
- WAN gateway IP range does not need to be bypassed.
- Logging is on.
root@R7800:~$ aegis clean
root@R7800:~$ aegis upgrade
Upgrading:
- Version installed: 1.1.4
- Version found: 1.2.6                   
? Do you want to upgrade from 1.1.4 to 1.2.6 (y/n)? y
- Downloading:
/tmp/aegis.dl                                100%[============================================================================================>]  55.77K  --.-KB/s    in 0.02s  
- Script installed to /opt/bolemo/scripts/aegis
root@R7800:~$ aegis restart
root@R7800:~$ aegis status
Status:
- 'aegis' is set and active for WAN interface (brwan) and VPN tunnel (tun21).
- Filtering 619548591 IP adresses.
- Bypassing 2 IP adresses.



I can no longer test this, but perhaps this minor issue could be worked around by using this oneliner for the upgrade: ??
Code:
aegis clean && aegis upgrade && aegis restart

To be safe, the upgrade should be each line separately, one at a time.

I will look now into the Web Companion download problems.
 
Workaround for the 404 error:

Code:
aegis web -remove
mkdir /opt/bolemo/www/cgi-bin 
aegis web -install
Yes, script is supposed to check and create the folder (as you do here).
Checking now...

Thanks for posting the quick fix while I am working on it ;-)
 
  • Like
Reactions: KW.
Workaround for the 404 error:

Code:
aegis web -remove
mkdir /opt/bolemo/www/cgi-bin
aegis web -install
fixed it here, thanks guys!

One little thought - upgrade tells me I can get version 1.2.7, but no where tells me what version I am currently running.
Although I know I am on 1.2.6.
 
Ok, 1.2.7 is here. it should fix the aegis web -install bug (before doing it twice probably would have worked, or @R. Gerrits fix of course :) )
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top