Rexxer

Some tips for me and other

Mikrotik

Powershell + Mikrotik backups

Source: https://habrahabr.ru/post/351108/ #зададим политику сразу, чтобы не вспминать команду при переносе Set-ExecutionPolicy remotesigned -scope currentuser #установка и импорт библиотеки для ssh Install-Module -Name Posh-SSH Import-Module posh-ssh $curDir = $MyInvocation.MyCommand.Definition | split-path -parent function bkprtr { param($ipaddr) #тут указываем логин и пароль к роутерам с правами на ftp и ssh. $secpasswd = ConvertTo-SecureString “Ваш_пароль_к_роутеру” -AsPlainText -Force […]

IPSEC between PFSence and Mikrotik + NAT like remote host is in the LAN

The PFSence side: Allow all traffic from the remote host. Create the IPSEC connection. Allow all traffic on the IPSEC interface. Create a Virtual IP for internal host (it is remote host now). Create the NAT rule for this host. The Mikrotik side: Allow all traffic from the remote host. Create the IPSEC connection. Create […]

Script for Mikrotik to monitor VPN IPSEC

:if ([/ping 192.168.0.149 interval=3 count=3]<2) do={ :log warning “IPSec KO, flushing SAs” /ip ipsec installed-sa flush sa-type=all } else={ :log info “IPSec OK” }

Mikrotik + script for a channel failing detecting

I have got a router Mikrotik 750. Periodically I have issues when the internet channel failed. But it start work when I changed port speed to 10Mbps and later turned it back to 100Mbps. (problem with cable 🙂 ) So, I wrote script for switching the port speed automatically: :global u :local PingCount 3; :local […]