Sunday, August 30, 2020

Mikrotik USB Modem Setup

Currently there are usb ports available in almost all mikrotik routers. Using this USB port we can connect USB modem with mikrotik router. However, the modem must be mikrotik compatible. A list of modems that are compatible with mikrotik routers can be found at the link below. 

https://wiki.mikrotik.com/wiki/Manual:Peripherals

In addition to the models mentioned in the list, it also supports almost all the modems available in the market. As we have used a simple modem in this tutorial, which is not in the compatible list of mikrotik.  However, this modem supports by router. If a modem is compatible with the mikrotik router, then the router will show the information of that modem in its USB list, when the modem is connecting to the router,. It will also create a "PPP Client Apapter" for him. We used a modem from Qualcomm and it shows up in the middle of the list.



To view this USB list, we first go to System -> Resource. We can see this list by clicking on the USB button there.



In addition to showing in this list, the router will create a “PPP Client” adapter for our modem and show it in the PPP interface list. However, this interface will remain disabled.



If a modem does not automatically detect by router, then we must assume that, this modem is not mikrotik compatible.

Now we will open the adapter to connect the modem and provide the APN information of the modem.



This APN information can be obtained from the SIM operator. Another thing we need to note is, whether the modem port is automatically detected. If not, then we have to manually select it.



Then we go to "Advanced Mode". For that, you just have to click on the “Advanced Mode” button.



After accessing the “Advanced Mode” we will go to the “PPP” tab. There we have to enter a dial number in the “Phone” field. Usually the number is "* 99 #". The number may also change from country to country. You can get this number from SIM operators. However, in most countries the number is "* 99 #".



After enabling and applying, the status of our adapter will change to "waiting for packets".



If everything is OK, after a while the status will be changed by "Link established" and then "connected".




At this stage our modem is now connected to the Internet. Now, to share this internet connection with users, we need to configure Source NAT using PPP client adapter. To configure NAT, we will go to “IP -> Firewall”. From there we will select “NAT”.


Now we will add a “src nat” rule by clicking on the “add (+)” button. Here we will select “srcnat” in the “Chain” field and have to select the PPP client adapter in the “Out Interface” field.


Now we will select "masquerade" as action.


Done. From now on all users will be able to connect to the internet using GSM modem.


No comments:

Post a Comment