Port forwarding through a USB modem
Avvertimento
For port forwarding to work, the USB modem must have a public IP address. If your mobile operator allocates an address like 10.x.x.x
, 172.16.x.x
, or 192.168.x.x
to your modem, it is of no use to forward ports, as it is a private address that is not routed on the Internet.
Some USB modems (e.g. in CDC Ethernet
mode) operate as routers with NAT and assign their LAN address as the default gateway to the Keenetic router. Even if your operator provides a public IP address, you must still enable the DMZ function in the USB modem settings.
Let's see how to do it using the example of a Huawei
modem with HiLink
firmware. In the modem web interface (available at 192.168.8.1
) in the DMZ Settings section, you need to enable the DMZ function (forwarding of all ports) and specify the address that the Keenetic receives from the modem as the DMZ IP address (in our example, it is 192.168.8.100
). It looks like this:

You can find the IP address that Keenetic receives from the USB modem in the router's system log. For example:
[I] ndhcpc: CdcEthernet0: received OFFER for 192.168.8.100 from 192.168.8.1. [I] ndhcpc: CdcEthernet0: received ACK for 192.168.8.100 from 192.168.8.1. [I] ndm: Dhcp::Client: configuring interface CdcEthernet0. [I] ndm: Network::Interface::IP: "CdcEthernet0": IP address is 192.168.8.100/24. [I] ndm: Dhcp::Client: obtained IP address 192.168.8.100/24. [I] Dhcp::Client: interface "CdcEthernet0" is global, priority 33117. [I] ndm: Dhcp::Client: adding a default route via 192.168.8.1. [I] ndm: Dhcp::Client: adding name server 192.168.8.1. [I] ndm: Dns::Manager: name server 192.168.8.1 added, domain (default). [I] ndm: Dhcp::Client: adding name server 192.168.8.1.
In the example shown, the Keenetic router obtained the IP address 192.168.8.100
(on the CdcEthernet
interface) from the USB modem (with the address 192.168.8.1
).
If it is possible to reserve this DMZ address (assigned to the router) in the modem's DHCP
settings, then do so.
If the USB modem web interface does not have a DMZ setting, you need to re-flash the modem with software with unlocked DMZ/NAT functions or change it to one with these functions.
Now, proceed to configuring port forwarding on the Keenetic router. Connect to the Web Interface and go to the Port Forwarding page. Add a port forwarding rule. In the Input field, choose the USB modem interface, and in the Output field, specify the device to which the ports will be forwarded. For more information, refer to the Port forwarding instructions.
