MikroTik basic reconfiguration
In case you have access to MikroTik device without UI available, only CLI then you possibly would like to know how to do some basic reconfiguration to gain access to admin panel listening on local network. So… to change user password:
1 | /user set admin password=mynewpassword |
To see all the configuration:
1 | export |
To create PPTP VPN:
1 2 3 4 | ip pool add name=PPTP-Pool ranges=192.168.99.10-192.168.99.200 ppp profile add change-tcp-mss= yes local -address=PPTP-Pool name=PPTP-Profile only-one= yes remote-address=PPTP-Pool use-encryption= yes dns-server=8.8.8.8,9.9.9.9 ppp secret add name=user1 password=YourPassword profile=PPTP-Profile interface pptp-server server set authentication=chap,mschap1,mschap2 default-profile=PPTP-Profile enabled= yes |
To adjust firewall for PPTP VPN:
1 2 3 | ip firewall filter add chain=input comment= "PPTP VPN" dst-port=1723 protocol=tcp ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade interface pptp-server add name=pptp-user1 user=user1 |
To enable HTTP web configuration:
1 2 3 | ip service print ip service set www port=81 ip service www address=0.0.0.0 /0 |
Now, once you connect thru PPTP VPN to the remote host, you can access UI. But if you set 0.0.0.0/0 as an address then you may also be able to connect to it using public address.