Необходимость обжимать интернет кабель в домашних условиях без помощи специалистов Интернет-провайдера возникает не часто. Например, такая необходимость может возникнуть если вы перемещаете свой компьютер или роутер в другую комнату. В данной статье вы узнаете, как правильно обжать интернет кабель в домашних условиях своими руками. Читать
Архив рубрики: Публикации
MikroTik Router Auto Backup via Email
MikroTik Router is popularly used in not only ISP network but also enterprise office network. So, network administrators of any company should learn how to maintain MikroTik router properly. A regular task of a network administrator is to store configuration file backup. Almost every network administrator takes configuration file backup manually. But MikroTik router provides an E-mail tool by which network administrators can automate configuration file backup regularly via email and can reduce his/her daily manual task easily. E-mail tool is not configured by default in MikroTik router. So, network administrators must configure E-mail tool as well as do some scripting for getting email backup service. In this article, I will show you how to configure MikroTik E-mail tool to get configuration file backup via email with a few steps.

MikroTik Router Automated Email Backup Configuration
Now we will configure MikroTik E-mail tool so that it can send configuration file backup via email. Complete configuration for storing backup and then sending via email can be divided into 3 steps.
- Email configuration
- Writing script for storing backup and sending Email
- Creating scheduler for executing script regularly
Step 1: MikroTik Router Email Configuration
For sending email from MikroTik router, first we need to configure sender email. MikroTik does not have a SMTP server. For this, we have to provide SMTP server as well as username and password so that MikroTik router can send mail through that SMTP server. So, to setup SMTP server and username and password in your MikroTik router, follow my below steps carefully.
- Go to Tools > Email and provide sender email information as below:
Server: SMTP Server IP address (Use your mail server IP or try using this Gmail IP: 173.194.77.108)
Port: SMTP Server Port (usually 25 or if you use Gmail SMTP, use 587)
From: Put your email address which will indicate from address for the mail.
User: Put email user name (first part of @ sign) or full email address if applicable.
Password: Put your email password. - Alternatively, you can do below cmd:/tool e-mail
set address=173.194.77.108
set port=587
set from=systemzonedotnet@gmail.com
set user= systemzonedotnet
set password=*******
Where 173.194.77.108 is Gmail SMTP Server IP, systemzonedotnet@gmail.com is a test mail ID created for this article and “*******” is the password. - For checking email configuration, send a test mail from MikroTik with below cmd:/tool e-mail send to=sezan.sayeed@yahoo.com subject=”email test” body=”email test” tls=yes
If everything is OK, the test email will be sent to the receiver email address. Email configuration has been completed if you follow above steps carefully. Now we will write script for storing backup file and sending via mail.
Step 2: Script for storing backup file and sending via email
After completing email configuration, we will no write a script that will store backup file and then send the backup file to the desired mail address. Follow below steps to write script in your MikroTik router.
- Go to System > Scripts and click on PLUS SIGN (+) to add new script. New Script window will appear.
- Type your script name (for example, Mail Backup) in Name input box and then copy and paste the below code in source box.
:log info “Mikrotik Backup JOB Started . . . “
:global backupfile configbackup
:log info “Deleting old Backup File If available otherwise ignore & process further . . . “
/system backup save name=$backupfile
:log info “Backup process pausing for 10s so it complete creating backup file”
:delay 10s
:log info “Start Sending Backup File via Email using GMAIL SMTP . . .” tool e-mailsend to=sezan.sayeed@yahoo.com subject=([/system clock get date] . ” MikroTik Backup”) body=”MikroTik email Backup” tls=yes file=$backupfile
:delay 40s
:log info “Backup Finished”
:log info “Deleting Backup File. All Done.”
/file remove $backupfile - Now click Apply and OK button for saving this script.
- You can run this script manually by clicking Run Script button or typing this cmd: > system script run 0
Script for storing configuration backup file and sending the file via email is now ready. Now we will create a scheduler so that this script can be run regularly at a fixed time.
Step 3: Scheduler for Executing Script Regularly
We have created script for storing configuration and sending via mail. But the script cannot execute itself. So, we have to create a scheduler that will execute the above script regularly at our desired time. For creating a scheduler in your MikroTik router, follow my below steps.
- Go to System > Scheduler and click on PLUS SIGN (+) to add new scheduler.
- Type scheduler name in Name input box and put script executing time in Start Time input box. For example, if you want to execute the script at 5:30 PM, put the time as 17:30:00.
- Put sending time interval at Interval input field. For example, if you want to execute the script daily, put the value as 24:00:00
- Now put your script name that you have provided at step 2(here, Mail Backup) in On Event box and then click Apply and OK button.
Scheduler is now ready. If everything is OK, MikroTik Router will send a mail regularly to the desired email address where configuration file should have attached.
You should follow the above steps one by one otherwise your desired result may not come. If you face difficulty to do above steps properly, please watch my video tutorial carefully about MikroTik Router Auto Backup via Email. I hope, it will reduce your confusion.
Note: This configuration has been done in MikroTik Router OS version 5.20. If you face any problem in upgraded version, please let me know. I will try to solve the problem.
MikroTik Router configuration file backup via email has been discussed in this article. I hope, you are now able to configure your MikroTik Router for sending configuration file backup via email. If you face any problem, feel free to discuss in comment or contact with from Contact page. I will try my best to stay with you.
Ускорить WordPress
Знакомый обратился с просьбой настроить сервер так, чтобы его сайт на WordPress работал быстрее. Сайт у него большой и посещаемый, поэтому требует значительное количество ресурсов. В этой статье расскажу как легче всего справиться с подобной задачей. Читать
WordPress 4.6 — cURL error 23: Failed writing body
Обновил WordPress до версии 4.6. В промо ролике расписывали о том, какой же офигенный новый релиз. Рассказывали как легко и красиво теперь обновляются плагины через AJAX: нажимаешь кнопочку, стрелочки крутятся, плагинчик обновляется. Но внутри новой версии ждал неприятный сюрприз в виде ошибки «cURL error 23: Failed writing body» Читать
LFS — Linux From Scratch
Автор: Джерард Бикманс
Редакторы: Метью Багрес, Брюс Дубс
Переводчик: Иван Лабутин
Язык: русский
Страниц: 367
Эта книга является ядром проекта Linux From Scratch, здесь вы найдете все инструкции и инструменты, необходимые для создания и построения собственного дистрибутива Linux. Книга даст вам шаблон полностью работающей и созданной вами операционной системы, вы сможете ее изменять, чтобы она соответствовала вашим потребностям и пожеланиям. Это самая главная задача проекта — вы контролируете все сами, книга просто дает вам некоторую базу в самом начале работы. Книга рассчитана на тех, кто хочет изучить Linux изнутри, понять как он работает и разобраться как все компоненты взаимодействуют друг с другом. Книга подойдет больше уже опытным пользователям, у которых есть некоторые знания Linux, новичкам же может быть тяжело со всем разобраться.
MikroTik VPN Configuration with PPTP (Connecting Remote Client)
VPN (Virtual Private Network) is a technology that extends private network across a public network. It enables private network users to send and receive data across public network as if their network devices were directly connected to the private network.
MikroTik Router provides a lot of VPN services. Among them, MikroTik PPTP is the mostly used VPN service. It is a client-server VPN. So, a user can access server, printer, IP phone and any other network devices of any private network across public network using MikroTik PPTP. For example, if you are a system administrator or an employee of an office and you need to access your office server, printer or any network devices while you are outside of your office, MikroTik PPTP will be a better solution for you.
MikroTik PPTP service can be applied in two methods.
- Connecting remote workstations/clients (VPN between routers and PPTP clients, almost all OSs including Windows)
- Site-to-Site PPTP (VPN between routers)
In this article, I will show how to configure MikroTik PPTP service that will be able to connect a remote workstation (any Operating System including Windows) across public network and the remote workstation will be able to get access to local network as if the workstation was directly connected to the local network.
Network Diagram
To configure a MikroTik PPTP service that will connect a remote workstation across public network, I am establishing a network like below diagram.
In this diagram, a MikroTik Router (say your office router) is connected to internet through ether1. Workstations are connected to ether2. Laptop is connected to the internet and can reach MikroTik Router’s public IP. After configuring PPTP Tunnel, the laptop will be able to connect to MikroTik local network as if it was directly connected to the local network.
IP Information for this configuration
- MikroTik WAN IP: 172.22.15.221/24 (Must replace with your Public IP provided by your ISP)
- MikroTik LAN Gateway: 192.168.20.1/24
- Local Address for remote client: 192.168.20.1 (MikroTik LAN Interface IP)
- Remote Address: 192.168.20.50 (IP address that will be assigned to remote client)
MiroTik VPN Configuration with PPTP
VPN configuration in MikroTik router with PPTP service can be divided into two parts.
- Part 1: MikroTik router basic configuration
- Part 2: PPTP server configuration
Part 1: MikroTik Router Basic Configuration
In the first part, we will complete MikroTik Router basic configuration. Basic RouterOS configuration includes assigning WAN IP, LAN gateway IP, DNS IP, NAT configuration and default route configuration. The following steps will show how to do these topics in your RouterOS.
- Login to MikroTik RouterOS using winbox and go to IP > Addresses. In Address List window, click on PLUS SIGN (+). In New Address window, put WAN IP address (172.22.15.221/24) in Address input field and choose WAN interface (ether1) from Interface dropdown menu and click on Apply and OK button. Click on PLUS SIGN again and put LAN IP (192.168.20.1/24) in Address input field and choose LAN interface (ether2) from Interface dropdown menu and click on Apply and OK button.
- Go to IP > DNS and put DNS servers IP (8.8.8.8 or 8.8.4.4) in Servers input field and click on Apply and OK button.
- Go to IP > Firewall and click on NAT tab and then click on PLUS SIGN (+). Under General tab, choose srcnat from Chain dropdown menu and click on Action tab and then choose masquerade from Action dropdown menu. Click on Apply and OK button.
- Go to IP > Routes and click on PLUS SIGN (+). In New Route window, click on Gateway input field and put WAN Gateway address (172.22.15.1) in Gateway input field and click on Apply and OK button.
Basic RouterOS configuration has been completed. Now it is time to enable PPTP server in our MikroTik Router.
Part 2: PPTP Server Configuration in MikroTik Router
After completing MikroTik router basic configuration, you need to configure PPTP server in MikroTik Router. Complete PPTP server configuration in MikroTik router can be divided into four steps.
- Enabling PPTP server
- Creating PPP Secrets (Username and Password)
- Enabling proxy-arp on LAN interface.
- Creating PPTP interface
Step 1: Enabling PPTP Server in MikroTik Router
The first step to create PPTP Tunnel in MikroTik Router is to enable PPTP server. The following step will show how to enable PPTP server in your MikroTik Router.
- Go to PPP menu item and click on PPTP Server button from PPP window.
- Now click on enabled checkbox and then click Apply and OK button. PPTP server will be enabled.
- Alternatively, you can do this cmd: > interface pptp-server server> set enabled=yes
- And to show pptp-server status: > interface pptp-server server> print
Step 2: Creating PPP Secrets(username and password)
Now it is time to create a user who will be connected to pptp server. To create username and password, follow the below steps carefully.
- Go to PPP > Secrets and click on PLUS SIGN (+).
- Now put username and password in Name and Password input field. Choose Service=pptp, Profile=default, Local Address= 192.168.20.1 (Router interface IP), Remote Address= 192.168.20.50 (Local IP address that will be assigned to the remote client).
- Click Apply and OK button. A PPTP user that means VPN user will be created now.
- Alternatively, you can do this cmd: > ppp secret> add name=username service=pptp password=123 local-address=192.168.20.1 remote-address=192.168.20.50
- To show secrets from cmd: > ppp secret> print
PPP user who will be connected from remote client machine has been created. At this point, if the user gets connected from the remote client machine and try to ping any workstation from the remote machine, the ping will time out because the remote client is unable to get ARPs from workstations. The solution is to set up proxy-arp on the LAN interface
Step 3: Enabling proxy-arp on LAN interface
The following steps will show how to enable proxy-arp on your LAN interface.
- Click on Interfaces menu item and then click on interface tab.
- Click twice on your LAN interface (ether2). Interface property window will appear.
- Under General tab, choose proxy-arp from ARP dropdown menu.
- Click Apply and OK button.
After enabling proxy-arp, the remote client can successfully reach all workstations in the local network behind the router.
Step 4: Creating PPTP Interface
You can optionally create PPTP interfaces. If you do not create PPTP interface manually, a PPTP interface will be created dynamically when a user will be connected. The following steps will show you how to create a PPTP interface for a specific user manually in MikroTik router.
- Go to PPP > Interface and click on PLUS SIGN (+) and then choose PPTP Server option.
- Put PPTP interface name in the Name field.
- Put username for whom you are creating this interface in User input field.
- Click on Apply and then OK button.
If you need to apply specific filter rule for a specific user, create this PPTP interface otherwise it is always better to allow creating PPTP interface dynamically.
PPTP Server is now ready to accept PPTP client. Now I will show how to create PPTP client in Windows Operating System.
PPTP Client Configuration
Almost all Operating Systems including Windows support PPTP client. In this article, I will show how to configure PPTP client in Windows 7 operating system. All other Windows versions follow almost the same procedure.
- Go to Control Panel and choose View Items by Small icons and then click on the Network and Sharing Center item.
- From Network and Sharing Center window, click on Setup a new connection or network
- From Setup a New Connection or Network window, choose Connect to a workplace connection option and click on Next button.
- Connect to a Workplace window will ask: How do you want to connect? Click on Use my Internet connection (VPN)
- Now provide MikroTik Router’s WAN IP in Internet address input field and provide a name of your VPN in Destination name input field and then click on Create button. Your VPN network adapter will be created.
- Again go to Network and Sharing Center window and click on Change adapter settings link. Your newly created VPN adapter will be found here.
- Click mouse right button and click Connect option.
- Now provide PPTP user’s username and password in Username and Password input field respectively and then click Connect button.
If everything is OK, you will be able to connect to your PPTP server and a PPTP Tunnel will be created between MikroTik Router and your remote client. Now try to ping and hope there will be no problem to get ping reply.
If you use other operating system than Windows, please search in Google how to create PPTP client at that specific operating system. I hope you will a get solution.
If you have any confusion to do above steps properly, please watch my below video carefully about MikroTik VPN configuration with PPTP. I hope, it will remove your any confusion about VPN in MikroTik Router with PPTP service.
MikroTik VPN configuration with PPTP has been discussed in this article. I hope, you are now able to configure a VPN tunnel with MikroTik PPTP. However, if you face any problem to configure a VPN network with MikroTik router, feel free to discuss in comment or contact with me from Contact page. I will try my best to stay with you.

