Script for OpnSense | Add a globe icon to the right of the active gateway name in the widget
(En) Support our project via Pix or PayPal.
(Pt-Br) Apoie nosso projeto via Pix ou PayPal:
- Brazilian Pix: d56da244-4dc5-4f77-be6d-28e94fdd46b2
- Paypal: https://bit.ly/MonitTelegram
“This project provides two scripts. One to get the active gateway information and another to modify the OPNsense “Gateways” widget file, and add a globe icon to the right of the active gateway name.”
- OPNsense Firewall
- SSH terminal
- Download the
install.shfrom this GitHub repository (last stable version) to your machine with OPNsense
- Enable SSH on OpnSense
- Download the file
install.sh - Set Permission
- Run the script
- Test
-
Enable SSH on OpnSense and access SSH
1.1 Enable SSH on OpnSense: System > Settings > Administration
1.2 Access OpnSense via SSH from terminal: ssh root@192.168.1.1. Replace root with your username and 192.168.1.1 with your OpnSense IP address. -
Download the file
install.sh
2.1 In terminal, navigate to the Widgets folder:cd /usr/local/www/widgets/widgets/
2.2 Use fetch to download "install.sh" from GitHub:
fetch https://raw.githubusercontent.com/macielmeireles/OpnSense-ActiveGateway-Globe/main/install.sh -
Set Permissions:
3.1 Set +x permission on the file:
chmod +x install.sh -
Run the script
4.1 In terminal, run the command to run the installion:./install.sh -
Test:
5.1 Open your opnSense in your Browser
To help, use: ./install --help
To check compatibility, use: ./install --check
To restore, use: ./install --restore
To update install.sh, use in terminal the command:
cd /usr/local/www/widgets/widgets/ && rm install.sh && fetch https://raw.githubusercontent.com/macielmeireles/OpnSense-ActiveGateway-Globe/main/install.sh && chmod +x install.sh && ./install.sh
- Ative o SSH no OpnSense
- Baixe o arquivo
install.sh - Defina a permissão
- Execute o script
- Teste
-
Ative o SSH no OpnSense e acesse via SSH
1.1 Ative o SSH no OpnSense: System > Settings > Administration
1.2 Acesse o OpnSense via SSH pelo terminal: ssh root@192.168.1.1. Substitua “root” pelo seu nome de usuário e “192.168.1.1” pelo endereço IP do seu OpnSense. -
Baixe o arquivo
install.sh
2.1 No terminal, navegue até a pasta Widgets:cd /usr/local/www/widgets/widgets/
2.2 Use o comando fetch para baixar o arquivo “install.sh” do GitHub:
fetch https://raw.githubusercontent.com/macielmeireles/OpnSense-ActiveGateway-Globe/main/install.sh -
Defina a permissão:
3.1 Defina a permissão +x no arquivo:
chmod +x install.sh -
Execute o Script
4.1 No terminal, execute o comando para iniciar a instalação:./install.sh -
Teste:
5.1 Abra o OpnSense no seu navegador
Para ajuda, use: ./install --help
Para verificar a compatibilidade, use: ./install --check
Para restaurar, basta usar: ./install --restore
Para atualizar o install.sh, use o seguinte comando no terminal:
cd /usr/local/www/widgets/widgets/ && rm install.sh && fetch https://raw.githubusercontent.com/macielmeireles/OpnSense-ActiveGateway-Globe/main/install.sh && chmod +x install.sh && ./install.sh
