PREROUTING AND BACKUP OF THE CONFIGURATION

Hello, i’m glad to be part of the forum’s member. I am called Philippe and i would like to get some solutions for one or two issues that i actually facing. Some help won’t be bad. :smiley: .
I am newly dealing with Mikrotik Staff. The one i use is the mikrotik Router rb4011igs+5hacq2hnd-in. My network Architecture is as follow :
plan.JPG
I would like to set the followed actions:

  • 1st ACTION : PREROUTING
    I would like to route a very group of users from this network: 192.168.20.0/24 to the FAI2 (ISP2) in priority and towards the first FAI1 (ISP1) in case of the unvalability of FAI2 (ISP2).
    By the way, i just want to notice the current configuration takes all networks to FAI1 (ISP1) and the second FAI2 (ISP2) is only used as a backup, tried to set an FailOver which is not changing automatically.

  • 2ieme ACTION : BACKUP
    I would like to automate the BackUp of the router’s configuration. BackUp per week or per month which will be sent by mail. After some research, i beleave that is only possible by making an scrpit

in sum, your help will bring much knowledges to my learning :sunglasses:
Many thanks in advance

Peut-être mieux d’utiliser Anglais.
Beaucoup plus de chance d’avoir des réponses sur vos questions.

:slight_smile:

Meci bien holvoetn, c’est fait

Really need somme help :frowning:

Easiest part:
backup to mail.

First hit when searching …
http://forum.mikrotik.com/t/automatic-backup-and-email-script/162792/1

Your other requirements are not really clear to me. Can you describe a bit more what you want to achieve ?

Really thanks for thoses tips, i will try them right away… :slight_smile:



Now for the first action:
The main purpose is to select a group of user connected to the wireless of the access point. Then, make those users specially go through my second ISP (ISP2). That is what i want to achieve. despite the actual config done on the router.
Only the selected users should take the way of the ISP2, and then if the wan port of the ISP2 is not available then ISP1 will be the way.

How I would tackle it:
conceptually the same method based on PCC and mangle rules.

Instead of assigning connection marks based on PCC classifier, you can either assign fixed IP to those specific users, or make those users connect to different SSID/VLAN (which then also will results in another subnet being used).
Whatever way you choose to be able to separate the traffic so the correct connection mark can be assigned.

Once that connect mark is set, the rest of the setup is the same as PCC.
If ISP2 is unavailable, the setup will allow to automatically move to ISP1.

Useful video for setting up PCC to be used as base.
https://www.youtube.com/watch?v=nlb7XAv57tw

Holvoe is bang on, the best thing is to identify a complete set of requirements before tackling the config.

  • any external traffic coming TO the router ( wireguard vpn?)
  • any external traffic coming TO the LAN ( servers ).
  • WAN1 and WAN2, which is primary overall and which is secondary.
  • Will the other be available to the users on the opposite WAN if we have a wan fail ( backup )

As noted, its much easier to separate users by SUBNET if you can do it by port, or by SSID (wifi) if you have wifi.
Very nice approach because if you can get people to use a specific SSID, we can assign a subnet to that SSID and
the goal is accomplished. Whats nice about that approach is it gives you two possibilities.
a. all the users know how to access both SSIDs, and thus depending upon their needs they can choose which interface to use
b. users only have access to the SSID the have been given permission (ssid password) to use ( admin control ).

The advantage of subnet approach is that you dont need the complexity of mangling and simply can use routing rules!

I am trying to achieve similar to the OP, though I am not worried about failover as I have 2 x WAN circuits from the same ISP, through one ONT at home. Most likely both circuits will fail at the same time.

I have watched the video a couple of times but never had much luck. The load balancing confuses me when I try to remove it. All I am after is fixed WAN routing for different subnets. Even sat through a few videos in tagalog but that still didn’t help.

Start your own thread dalben, post the config and will have a l ook

http://forum.mikrotik.com/t/dual-wan-same-gateway-no-need-for-load-balancing-or-failover-just-specify-which-vlans-use-which-wan-port/171378/1

Thank you for answering and for the video, I will try it and if I face any issues, I will update you by starting my own thread for better conversation.

Edit: My problem resolved.