Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to MikroGuard #31

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
with:
images: |
ghcr.io/xterm-inator/microguard
ghcr.io/xterm-inator/mikroguard
tags: |
type=ref,event=branch
type=ref,event=pr
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

MicroGuard web-based management tool for handling WireGuard clients on MikroTik routers.
MikroGuard web-based management tool for handling WireGuard clients on MikroTik routers.
Copyright (C) 2023 David Smith

This program is free software: you can redistribute it and/or modify
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

MicroGuard Copyright (C) 2023 David Smith
MikroGuard Copyright (C) 2023 David Smith
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
61 changes: 30 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# MicroGuard

MicroGuard is a robust web-based management tool designed to streamline the handling of WireGuard VPN clients on MikroTik routers. It simplifies user addition, access revocation, and provides a real-time view of connection statistics.
# MikroGuard
### **Recently renamed from microguard. For now the microguard ghcr image will continue to be updated inline with the new mikroguard ghcr for backwards compatibility, But would recommend switching to the new image. No migration steps are needed, the only difference is the name and the new mikroguard image won't have versions before v1.1.4

MikroGuard is a robust web-based management tool designed to streamline the handling of WireGuard VPN clients on MikroTik routers. It simplifies user addition, access revocation, and provides a real-time view of connection statistics.

| Login | Users | Connection |
| --- | --- | --- |
![login](https://github.com/xterm-inator/microguard/assets/7698065/3ea6b5b0-b9ca-4b1b-a546-955724d5bedf) | ![user](https://github.com/xterm-inator/microguard/assets/7698065/4864029e-c176-4577-96f1-20bf3e982b53) | ![connection](https://github.com/xterm-inator/microguard/assets/7698065/1f44b3b7-f4c6-4bd1-819a-b1e19fdf619c)
![login](https://github.com/xterm-inator/MikroGuard/assets/7698065/3ea6b5b0-b9ca-4b1b-a546-955724d5bedf) | ![user](https://github.com/xterm-inator/MikroGuard/assets/7698065/4864029e-c176-4577-96f1-20bf3e982b53) | ![connection](https://github.com/xterm-inator/MikroGuard/assets/7698065/1f44b3b7-f4c6-4bd1-819a-b1e19fdf619c)


## Table of Contents
- [Features](#features)
- [Requirements](#requirements)
- [Setup](#setup)
- [Adding a User to MikroTik for MicroGuard](#adding-a-user-to-mikrotik-for-microguard)
- [Creating a Road Warrior Wireguard Interface for MicroGuard](#creating-a-road-warrior-wireguard-interface-for-microguard)
- [Adding a User to MikroTik for MikroGuard](#adding-a-user-to-mikrotik-for-mikroguard)
- [Creating a Road Warrior Wireguard Interface for MikroGuard](#creating-a-road-warrior-wireguard-interface-for-mikroguard)
- [Server Installation](#server-installation)
- [Usage](#usage)
- [Local Development and Testing with Docker Compose](#local-development-and-testing-with-docker-compose)
- [Contributing](#contributing)
- [License](#license)
Expand All @@ -30,47 +29,47 @@ MicroGuard is a robust web-based management tool designed to streamline the hand
## Requirements

- MikroTik router with RouterOS version 7.0 or newer.
- Docker for running the MicroGuard server.
- Docker for running the MikroGuard server.

## Setup

### Adding a User to MikroTik for MicroGuard
### Adding a User to MikroTik for MikroGuard

**Using Winbox**:

1. Log in to your MikroTik router using Winbox.
2. Navigate to the "System" menu and select "Users".
3. Click on the "Groups" tab.
4. Click on the "Add New" button to create a new user group.
5. Enter a name for the group, such as "microguard-group" and click on the "OK" button.
6. In the "Permissions" tab, select the desired permissions for the group. For MicroGuard, the user group should have read, write, and API access.
5. Enter a name for the group, such as "MikroGuard-group" and click on the "OK" button.
6. In the "Permissions" tab, select the desired permissions for the group. For MikroGuard, the user group should have read, write, and API access.
7. Click on the "Apply" button to save the changes.
8. Click on the "Users" tab.
10. Enter the user's details, such as their name and password.

> **Warning**: Always input the correct local subnet into the allowed address. If unsure about the configuration, seek expert advice.


11. In the "Groups" tab, select the "microguard-group" group you just created.
11. In the "Groups" tab, select the "MikroGuard-group" group you just created.
12. Click on the "Apply" button to save the changes.

**Using Command Line**:

To set up a new user group and user, input:
>This will create a new user group named "microguard-group" with the necessary permissions for MicroGuard.
>This will create a new user group named "MikroGuard-group" with the necessary permissions for MikroGuard.
```sh
/user group add name=microguard-group policy=local,read,write,test,api,winbox,password
/user group add name=MikroGuard-group policy=local,read,write,test,api,winbox,password
```

Enter the following command to create a new user:
>Replace "username" with the desired username and "userpassword" with the desired password for the new user.
```sh
/user add name=username group=microguard-group password=userpassword
/user add name=username group=MikroGuard-group password=userpassword
````

> **Warning**: Ensure correct subnet configuration as highlighted in the Winbox method.

### Creating a Road Warrior WireGuard Interface for MicroGuard
### Creating a Road Warrior WireGuard Interface for MikroGuard

1. Access your MikroTik router via Winbox.
2. Go to "WireGuard" > "Add".
Expand All @@ -81,15 +80,15 @@ Enter the following command to create a new user:

1. Ensure Docker is up and running on your server.
2. Generate an app key via [this generator](https://generate-random.org/laravel-key-generator) for use in upcoming commands.
3. Deploy MicroGuard using:
3. Deploy MikroGuard using:

> If you don't want to use google sso remove the google environment variables from the following commands

**Docker Command**

````bash
docker run -d
--name microguard
--name MikroGuard
-p 8000:8000
-v /path/to/data:/opt/app/storage
-e APP_KEY=
Expand All @@ -103,16 +102,16 @@ docker run -d
-e ROUTEROS_WIREGUARD_INTERFACE='wireguard' #wireguard interface name
-e ROUTEROS_WIREGUARD_ENDPOINT='192.168.0.1:13231' #ip:port for wireguard interface
-e APP_URL='https://my.public.address'
ghcr.io/xterm-inator/microguard:latest
ghcr.io/xterm-inator/mikroguard:latest
````

**Docker Compose**:
```yml
version: '3.8'
services:
microguard:
image: ghcr.io/xterm-inator/microguard:latest
container_name: microguard
MikroGuard:
image: ghcr.io/xterm-inator/mikroguard:latest
container_name: MikroGuard
restart: always
ports:
- 8000:8000
Expand Down Expand Up @@ -159,12 +158,12 @@ This is a list of the most useful environment variables. To find all available l
## Initial User
To create the initial user run: (replace: admin@xterm.me with your email)
```bash
docker compose exec microguard php artisan app:create-user admin@xterm.me admin
docker compose exec MikroGuard php artisan app:create-user admin@xterm.me admin
```

## Local Development and Testing with Docker Compose

To facilitate local development and testing, we've incorporated Docker Compose. This allows developers to run the entire MicroGuard stack locally without complex setups.
To facilitate local development and testing, we've incorporated Docker Compose. This allows developers to run the entire MikroGuard stack locally without complex setups.

### Prerequisites:

Expand All @@ -175,11 +174,11 @@ To facilitate local development and testing, we've incorporated Docker Compose.
### Steps:

1. Clone the Repository:
Use Git to clone the MicroGuard repository to your local machine:
Use Git to clone the MikroGuard repository to your local machine:
```bash
git clone git@github.com:xterm-inator/microguard.git
git clone git@github.com:xterm-inator/MikroGuard.git
# Navigate into the repository directory:
cd microguard
cd MikroGuard
```

2. Set Up Environment Variables:
Expand Down Expand Up @@ -210,11 +209,11 @@ To facilitate local development and testing, we've incorporated Docker Compose.
```

6. Run with Docker Compose:
Start the MicroGuard stack using Docker Compose:
Start the MikroGuard stack using Docker Compose:
```bash
docker compose up
```
This will build and start all necessary containers. Once done, the MicroGuard interface should be accessible at http://localhost:3000.
This will build and start all necessary containers. Once done, the MikroGuard interface should be accessible at http://localhost:3000.

7. Shutdown and Cleanup:
When you're done with local development/testing, you can stop the Docker Compose services:
Expand All @@ -230,7 +229,7 @@ This error is normally caused when the browser is accessing the server from an a
Try setting this to the address you are using, can be localhost, an IP address or a domain eg. http://localhost:8000

## Contributing
Contribute to MicroGuard by submitting a pull request or issue on GitHub. We welcome bug reports, feature suggestions, and code enhancements from the community.
Contribute to MikroGuard by submitting a pull request or issue on GitHub. We welcome bug reports, feature suggestions, and code enhancements from the community.

## License
MicroGuard is licensed under the GNU General Public License v3.0. Details are in the [LICENSE.md](LICENSE.md) file.
MikroGuard is licensed under the GNU General Public License v3.0. Details are in the [LICENSE.md](LICENSE.md) file.
2 changes: 1 addition & 1 deletion api/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
|
*/

'name' => env('APP_NAME', 'MicroGuard'),
'name' => env('APP_NAME', 'MikroGuard'),

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion api/config/session.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@

'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'microguard'), '_').'_session'
Str::slug(env('APP_NAME', 'MikroGuard'), '_').'_session'
),

/*
Expand Down
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MicroGuard</title>
<title>MikroGuard</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/templates/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
MicroGuard
MikroGuard
</a>

<div class="navbar-nav flex-row order-md-last">
Expand Down
Loading