Community discussions

MikroTik App
 
User avatar
Halfeez92
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Tue Oct 30, 2012 12:58 pm
Location: 127.0.0.1
Contact:

Change gateway distance if RFC1918 address assigned

Wed Oct 12, 2022 11:00 am

Hi,

Currently I am having 2 ISP connected to my Mikrotik using PPPoE. The problem is if one of the PPPoE is getting barred (for not paying the subs reason), so the ISP will assign the address to RFC1918 which are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. So how can I make a script to check if the address assigned on the PPPoE interface within the RFC1918 and automatically change the route distance so the default gateway also will change to another ISP that do not have the RFC1918 address pool. Thanks.

P/S: I am not experienced in scripting and programming.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Change gateway distance if RFC1918 address assigned

Thu Oct 13, 2022 10:12 am

Isn't it better to pay instead?
 
User avatar
Halfeez92
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Tue Oct 30, 2012 12:58 pm
Location: 127.0.0.1
Contact:

Re: Change gateway distance if RFC1918 address assigned

Thu Oct 13, 2022 11:18 am

Isn't it better to pay instead?
Not helping. We have a lot of PPPoE accounts and sometimes we just missed some of them. If you don't want to help, don't reply please.
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 766
Joined: Mon May 27, 2013 2:05 am

Re: Change gateway distance if RFC1918 address assigned

Thu Oct 13, 2022 12:09 pm

Simplest solution is pay the bill so it doesn't suspend. Many of us here being ISP operators probably aren't super keen to help you circumvent ISP suspensions.

Having said that - you could use a netwatch command to change default gateways - not really scripting just run CLI commands on up/down.

Who is online

Users browsing this forum: UkRainUa and 18 guests