GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - gajdipajti/wg-routeros-network: Tools for generating a Wireguard network for Mikrotik RouterOS

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
routeros-configs
routeros-configs
 
 
2023_Wireguard2.pptx
2023_Wireguard2.pptx
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
table.csv
table.csv
 
 
wg-gen.pl
wg-gen.pl
 
 

Repository files navigation

wg-routeros-network

Tools for generating a Wireguard network for Mikrotik RouterOS and possibly other peers later. This should be the ideal home office setup.

Currently implemented functions in the wg-gen.pl Perl script:

  • Generate a table.csv with all the keys pairs, tunnel ip addresses and LAN networks.
  • Generate server and client configuration, which include:
    • Wireguard interface and peer configuration in a 1 server - N peer network.
    • Set up static routes to reach each peer's LAN subnet.
    • We only NAT at the wireguard tunnel endpoints WAN interface.
    • Implement the routing of 0.0.0.0/0 into the tunnel using routing-mark and a new routing table. To disable this, just disable the mangle firewall rule.
    • Set ntp and timezone.

Missing functionality:

  • change static routes to OSPFv2.
  • configure the peer's wireless interface with CAPsMAN.
  • generate configuration files for Linux, Windows, Android.
  • generate the QR code for mobile clients.

Perl script

Install on ubuntu: sudo apt install wireguard-tools libimager-qrcode-perl

This will generate 5 RouterOS peers and 21 Linux, Windows, Android...

./wg-gen.pl 5 21

Old table generation

A simple table can be generated using the following bash script:

for idx in $(seq 1 20)
do 
  echo "$idx; 10.0.0.$idx; $(wg genkey | xargs bash -c 'echo -n $@; echo -n \;\ ; echo $@ | wg pubkey' bash)";
done

About

Tools for generating a Wireguard network for Mikrotik RouterOS

Topics

routeroswireguard

Resources

Readme
GPL-3.0 license
Activity

Stars

2 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.