All Projects → smartupio → aws-vpn-mikrotik

smartupio / aws-vpn-mikrotik

Licence: GPL-3.0 license
Shell script to transform a Generic AWS VPN configuration guide to MikroTik specific set up commands that can be copy pasted into a mikrotik console to set up the customer end of the connection.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to aws-vpn-mikrotik

Mikrotik API
Mikrotik Dashboard
Stars: ✭ 46 (+21.05%)
Mutual labels:  mikrotik, mikrotik-console
ikev2-docker
Run a IKEv2 VPN in a Docker containern without any effort
Stars: ✭ 29 (-23.68%)
Mutual labels:  vpn
vpn app
Simple Vpn app concept UI done in Flutter.
Stars: ✭ 67 (+76.32%)
Mutual labels:  vpn
v2ray-free
Fuck gfw,免费翻墙,每天更新
Stars: ✭ 221 (+481.58%)
Mutual labels:  vpn
phpmixbill
PHP Mikrotik Billing - Voucher management for Mikrotik Hotspot
Stars: ✭ 134 (+252.63%)
Mutual labels:  mikrotik
Vytal
Browser extension to spoof timezone, geolocation, locale and user agent.
Stars: ✭ 1,449 (+3713.16%)
Mutual labels:  vpn
addon-zerotier
ZeroTier One - Home Assistant Community Add-ons
Stars: ✭ 103 (+171.05%)
Mutual labels:  vpn
Cybernet-VPN
Android Cybernet VPN App
Stars: ✭ 28 (-26.32%)
Mutual labels:  vpn
ZeroHub
c# implementation aimed for nat traversal using OpenVPN tuntap driver
Stars: ✭ 15 (-60.53%)
Mutual labels:  vpn
docker-routeros
Mikrotik RouterOS inside Docker container
Stars: ✭ 225 (+492.11%)
Mutual labels:  mikrotik
Easy-HotSpot
Easy HotSpot is a super easy WiFi hotspot user management utility for Mikrotik RouterOS based Router devices. Voucher printing in 6 ready made templates are available. Can be installed in any PHP/MySql enabled servers locally or in Internet web servers. Uses the PHP PEAR2 API Client by boenrobot.
Stars: ✭ 45 (+18.42%)
Mutual labels:  mikrotik
Video-Pixel-Networks
Video Pixel Networks in Tensorflow
Stars: ✭ 56 (+47.37%)
Mutual labels:  vpn
AdClear-Open-Source-Issue-Tracker
Open Source Issue Tracker for AdClear non-root ad blocker for Android
Stars: ✭ 101 (+165.79%)
Mutual labels:  vpn
mian-fan-qiang
各大机场免翻墙地址搜集,不定期更新。欢迎收藏,转发。
Stars: ✭ 361 (+850%)
Mutual labels:  vpn
RouterOS Useful Scripts
MikroTik RouterOS Useful Scripts for various use
Stars: ✭ 66 (+73.68%)
Mutual labels:  mikrotik
tunman
Comprehensive solution for SSH tunnels - respawning, healthchecking/monitoring
Stars: ✭ 43 (+13.16%)
Mutual labels:  vpn
blog
📖 个人博客
Stars: ✭ 27 (-28.95%)
Mutual labels:  vpn
desktop-app-ui
Official IVPN Desktop app (legacy version)
Stars: ✭ 23 (-39.47%)
Mutual labels:  vpn
vpns
A collection of vpns
Stars: ✭ 112 (+194.74%)
Mutual labels:  vpn
autoygg
A tool to automatically configure internet egress on an yggdrasil network.
Stars: ✭ 19 (-50%)
Mutual labels:  vpn

Transform your AWS VPN Generic Config to a Mikrotik set-up script

Problem description

Unfortunately AWS doesn't support MikroTik in predefined configuration to VPC connect.

We were struggling for a few days now to set up a VPN connection into AWS, because of a MikroTik limitation (http://rant.gulbrandsen.priv.no/mikrotik/ipsec-policy-bugs) and the lack of general documentation as well.

We have created a script that will transform your Generic (Vendor Agnostic) AWS VPN Configuration guide, that you can download from the AWS console into a MikroTik specific configuration script that you can copy-paste into your MikroTik SSH console.

Obviously, we are not accountable for any trouble that this causes to you or your organization, so use it on your own risk.

Usage example

# You have to give the script one argument,
# the path of the file you downloaded from AWS
# Example:
[mate@devmate]$ ./static-router-config ~/Downloads/vpn-12345abc.txt

Type in local network CIDR (Enter to use guessed 192.168.1.0/24):
Type in your VPC CIDR [10.0.0.0/16]):

Your configuration will be created by using the following values
Your public adddress: 1.2.3.4
Your local network CIDR: 192.168.1.0/24
Your VPC's CIDR: 10.0.0.0/16

AWS Tunnel #1 - Public Address: 5.6.7.8
AWS Tunnel #1 - Inside Customer Gateway Address: 169.254.x.x
AWS Tunnel #1 - Inside Virtual Gateway Address: 169.254.x.x
AWS Tunnel #1 - Secret: THISISVEEEERYVEEERYSECRET

AWS Tunnel #2 - Public Address: 10.11.12.13
AWS Tunnel #2 - Inside Customer Gateway Address: 169.254.y.y
AWS Tunnel #2 - Inside Virtual Gateway Address: 169.254.y.y
AWS Tunnel #2 - Secret: THISISVEEEERYVEEERYSECRET

Is this correct(y/n)? y
Generate the config file in [./mikrotik-aws-config]:
Your config file has been generated in mikrotik-aws-config

Now just copy paste the contents of the generated config file into MikroTik's SSH console and you should be up and running.

Note:

Do not forget to add static routes from AWS back to your home network as well.

Also, make sure you have your route tables correctly set up, and define routes back to your home network.

##Dynamic routing config It's possible to use the dynamic configuration too. The script will ask some other parameters.

[fams@nomade]:Amazon $ ./dynamic-router-config vpn-123456.txt
Type in local network CIDR (Enter to use guessed 192.168.0.0/24):
Type in local MKT interface (Enter to use guessed ether1-local): ether1-lan
Type in PUBLIC MKT interface (Enter to use guessed ether2-internet): ether2-inter
Type in your VPC CIDR [10.0.0.0/16]): 10.0.0.0/16

Your configuration will be created by using the following values
Your public adddress: 1.2.3.4
Your local network CIDR: 192.168.0.0/24
Your VPC's CIDR: 10.0.0.0/16

AWS Tunnel #1 - Public Address: 5.6.7.8
AWS Tunnel #1 - Inside Customer Gateway Address: 169.254.X.X
AWS Tunnel #1 - Inside Virtual Gateway Address: 169.254.X.X
AWS Tunnel #1 - Secret: THISISVEEEERYVEEERYSECRET
AWS Tunnel #1 - Customer ASN: 65000
AWS Tunnel #1 - Virtual Gateway ASN: 7224

AWS Tunnel #2 - Public Address: 10.11.12.13
AWS Tunnel #2 - Inside Customer Gateway Address: 169.254.y.y
AWS Tunnel #2 - Inside Virtual Gateway Address: 169.254.y.y
AWS Tunnel #2 - Secret: THISISVEEEERYVEEERYSECRET
AWS Tunnel #2 - Customer ASN: 65000
AWS Tunnel #2 - Virtual Gateway ASN: 7224

Is this correct(y/n)? y
Generate the config file in [./mikrotik-aws-config]:
Your config file has been generated in mikrotik-aws-config

Kudos

Kudos go out to these guys who wrote blog posts on this topic and shared my pain.

Contributions

Feel free to fork and improve or contribute.

May the source be with you.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].