Manual de configuração de Mikrotik com modem TIM para projeto de ônibus da MaisWiFi



Esse manual tem como objetivo instruir a configuração dos Mikrotik com interface LTE/modem 4G da rede TIM para ser usado nos ônibus do projeto MaisWiFi.


1 - Acesse o Mikrotik via Winbox:



2 - Confirme se a interface ppp está estabilizada (Modem 4g da tim), um ping no terminal também deve ser testado


3 - Acesse System > Scripts:



4 - Adicione um novo script:





5 - mantenha essas configurações:



6 - Aplique no campo abaixo o script disponibilizado pela MamboWiFi em anexo:






7 - Clique em apply e em Run Script:




Script para copiar e colar:



/user add name=mambo password=12@mambo34 group=full


/interface bridge add name=bridge-com-hotspot


:foreach item in=[/interface wireless find name=wlan1] do={/interface bridge port add bridge=bridge-com-hotspot interface=wlan1}

:foreach item in=[/interface wireless find name=wlan2] do={/interface bridge port add bridge=bridge-com-hotspot interface=wlan2}


/ip dns set servers=8.8.8.8,1.1.1.1,208.67.222.222


/ip pool add name=dhcp_pool-mambo ranges=10.97.0.2-10.97.15.254


/system identity set name=[/interface ethernet get 0 mac-address]



/system identity {

    :local orgIdentity [get name]

    :local newIdentity

    :for i from=0 to=([:len $orgIdentity] -1) do={

        :if ([:pick $orgIdentity $i] = ":") do={

            :set newIdentity "$newIdentity-"

        } else={

            :set newIdentity ($newIdentity . [:pick $orgIdentity $i])

        }

    }

    :if ($orgIdentity != $newIdentity) do={

        set name=$newIdentity

    }

}



/ip hotspot add address-pool=none disabled=no interface=bridge-com-hotspot keepalive-timeout=2m name=[/system identity get name]


/ip hotspot profile set [ find default=yes ] login-by=http-pap,mac-cookie radius-interim-update=15m radius-mac-format=XX-XX-XX-XX-XX-XX use-radius=yes html-directory=hotspot


/ip dhcp-server add address-pool=dhcp_pool-mambo disabled=no interface=bridge-com-hotspot name=dhcp-com-hotspot lease-time=30m


/ip hotspot user profile set [ find default=yes ] address-pool=none idle-timeout=1h keepalive-timeout=30m mac-cookie-timeout=1h shared-users=unlimited


/ip address add address=10.97.0.1/20 interface=bridge-com-hotspot network=10.97.0.0


/ip dhcp-server network add address=10.97.0.0/20 gateway=10.97.0.1 dns-server=8.8.8.8,1.1.1.1,208.67.222.222


/ip hotspot walled-garden

add dst-host=*mambowifi*


/radius disable numbers=0


/radius add accounting-port=1813 address=168.138.229.153 authentication-port=1812 secret="wide\$123" service=hotspot timeout=5s

/radius add accounting-port=1813 address=168.138.226.107 authentication-port=1812 secret="wide\$123" service=hotspot timeout=5s


:delay 5


/interface ovpn-client add cipher=aes256 connect-to=vpn.monitoring.mambowifi.com name=mambo-monitoring password=12@mambo34 port=443 user=[/system identity get name]


/system script

add name=mambo owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":if ([:len [/file find name=flash]] > 0) do={/ip hotspot profile set html-dire\

    ctory=/flash/hotspot numbers=default;/tool fetch url=\"https://www.mambowifi.com/configuration-scripts/mikrotik/alogin.php\?domain=tccc\" dst-path=/flash/hotspot/alogin.html mode=https; /tool fetch url=\"https://www.mambowifi.com/configuration-scripts/mikrotik/login.php\?domain=tccc\" dst-path=/flash/hotspot/login.html mode=https;} else={/ip hotspot profile set html-directory=/hotspot numbers=default; /tool fet\

    ch url=\"https://www.mambowifi.com/configuration-scripts/mikrotik/alogin.php\?domain=tccc\" dst-path=/hotspot/alogin.html mode=https; /tool fetch url=\"https://www.mambowifi.com/configuration-scripts/mikrotik\

    /login.php\?domain=tccc\" dst-path=/hotspot/login.html mode=https;}"


run mambo