Pages

Saturday, April 22, 2017

MikroTik - Two WAN load balance | Line Merger PCC method with Hotspot

MikroTik is a powerful Router and has lots of features and services. In this tutorial we will learn how to use multiple WAN connection and load balance the traffic between these WAN connections. I am using two ADSL connection and change the IP address as below.

ADSL Router 1 IP : 192.168.1.1
ADSL Router 2 IP : 192.168.10.1

and MikroTik Ethernet Ports IP are
Local : 192.168.0.1
WAN1 : 192.168.1.20
WAN2 : 192.168.10.20

Script

/ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local
add address=192.168.1.20/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1
add address=192.168.10.20/24 network=192.168.10.0 broadcast=192.168.10.255 interface=WAN2

/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=8.8.8.8

/ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn

add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2

add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.10.0/24 action=accept in-interface=Local

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes

add chain=prerouting connection-mark=WAN1_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN2

/ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_WAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.10.1 routing-mark=to_WAN2 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.10.1 distance=2 check-gateway=ping

/ip firewall nat
add chain=srcnat out-interface=WAN1 action=masquerade
add chain=srcnat out-interface=WAN2 action=masquerade

For uneven WAN connections for example WAN,1 is of 4MB and WAN,2 is of 8 Mb
------------------------------------------------------------------------------------------------------
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/2 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes


PCC with Hotspot
----------------------
/ip firewall nat add action=accept chain=pre-hotspot disabled=no dst-address-type=!local hotspot=auth

You can adjust the script according to your IP scheme or make use these IP

Download the Two WAN load Balance Script

This script is for equal bandwidth connection and also unequal just read it carefully and execute command as per your scenario and requirement. Don't just blindly copy and paste the script.

Thanks for reading and watching.
Visit my YouTube Channel HomeTech

Please Support my YouTube Channel by liking and subscribing
I spend more time on my YouTube Channel so all comments are 101%  replied there
Comments and suggestions are welcome to improve the tutorial and help other

Share Happiness

See the video for more details
Comming Soon

Friday, April 21, 2017

MikroTik - Hotspot QR Code | Bar Code Vouchers with Serial Number using NiceLabel

MikroTik RouterOS is powerful Linux based OS and have lots of features
from firewall to Load balance and hotspot to VPN server. One of these is builtin radius server userman which service as central user database and billing server (Prepaid and postpaid) for all the service which support Radius client (NAS).

Today we will learn how to Design our custom pre paid voucher with QR Bar Code and Serial number for easy login from Smart phone, Stock counting and professional look using NiceLabel. You can also design and voucher or card with different bar code as per your situation and products. So lets get to work.

I assume that you are familiar with MikroTik basic and userman

  1. Install the NiceLabel for Designing Voucher Cards
  2. Login to your Radius Server or MikroTik userman 
  3. Create batch of username and password with your desired package.
  4. Download the batch of username and password as csv file
  5. It will be in dot HTML extension so rename it to dot csv extension
  6. Now open the NiceLabel and create the voucher design and import the csv file of step 4
  7. You can use image of pre designed voucher in background or design from scratch in NiceLabel
  8. See the video for more detail steps

The Nice Label can downloaded Here

Thanks for reading and watching.
Visit my YouTube Channel HomeTech

Please Support my YouTube Channel by liking and subscribing
I spend more time on my YouTube Channel so all comments are 101%  replied there
Comments and suggestions are welcome to improve the tutorial and help other

Share Happiness

See the video for more details


Saturday, April 8, 2017

AirLink Hotspot - Configure MikroTik Hotspot as Radius Client for User Authentication

This the third tutorial of airlink hotspot and today we will learn how to connect MikroTik hotspot with airlink as radius client to authenticate mikrotik hotspot user. airlink is freeRadius web interface and also can act as hotspot. but since it also a freeRadius AAA server so other hotspot can also be authenticated from airlink as billing server.

Thanks for reading and watching.
Visit my YouTube Channel HomeTech

Please Support my YouTube Channel by liking and subscribing
Comments and suggestions are welcome to improve the tutorial and help other

Share Happiness

See the video for more details

MikroTik - Step by Step Hotspot Configuration | Captive Portal #2


This the 2nd tutorial of our MikroTik series. We will learn how to setup hotspot some time known as captive portal. If you already followed the first tutorial then you are good to go. Setting hotspot on MikroTik is very easy and just need a few thing to setup and rest is all automatic.

Thanks for reading and watching.
Visit my YouTube Channel HomeTech

Please Support my YouTube Channel by liking and subscribing
I spend more time on my YouTube Channel so all comments are 101%  replied there
Comments and suggestions are welcome to improve the tutorial and help other

Share Happiness

See the video for more details

MikroTik - Basic Configuration as Internet Sharing NAT Router #1


We will learn the basic configuration of MikroTik router. I used x86 based MikroTik RouterOS on VMWare with two ethernet ports one as WAN and other is LAN. We will configure it as NAT router to share the internet connection.
First identify the ethernet port and set IP address for it. The set DHCP server and add Firewall rule for the LAN Network. and you are ready to go.

Thanks for reading and watching.
Visit my YouTube Channel HomeTech

Please Support my YouTube Channel by liking and subscribing
I spend more time on my YouTube Channel so all comments are 101%  replied there
Comments and suggestions are welcome to improve the tutorial and help other

Share Happiness

See the video for more details