Sometimes it is necessary to change the standard control port number 80/HTTP or 23/Telnet of a Keenetic device to some other port number.
For example, a home network may have a web server that already uses port 80 but cannot change the port number. Or some ISPs may filter (block) incoming user traffic by standard protocols and ports (e.g. 80/HTTP and 23/Telnet), making it impossible to access the Keenetic on pre-defined ports remotely.
To change the standard management port (80) in the web interface, go to the Users and access page. In the section 'TCP port for managing the Keenetic', you can change the default TCP ports of the web interface and command-line interface (CLI).
In the 'HTTP port' field select one of the options: 81, 280, 777, 5080, 8080, 8090, 65080.
If you need to assign a port number that is not from the offered list, you can do this from Keenetic command-line interface. You can assign an HTTP port for the web interface by command:
ip http port <port number>
ip http port 8181
NOTE: Important! After changing port 80, Keenetic management will be available through the new port number. To access the web interface in the browser, you will need to enter an address as follows: LAN_IP_router_address:port_number (LAN access) or WAN_IP_router_address:port_number (Internet access)
To change the standard port of the command line interface (23), specify a new port number in the 'TELNET port' field (can take values from 1 to 65535 inclusively).
The same setting can be performed from the Keenetic command-line interface. The command is intended for this purpose:
ip telnet port <port number>
ip telnet port 2023
NOTE: Important! After changing port 23, Keenetic management via Telnet will be available through the new port number. To access the CLI, you will need to use the command
telnet IP_router_address port_number.
To replace the default management port number with a custom one, you can use the port forwarding mechanism.
Sometimes there is a situation when it is necessary to replace one port number 'X' with another port 'Y' (also called port mapping). Port forwarding can be used when standard port numbers are blocked on the ISP side, or when the required port numbers are already occupied.
NOTE: Important! When creating port forwarding rules, they will only work in the direction from WAN to LAN (from the Internet to the local network). In the local network, the router will still be available via standard ports 80/HTTP and 23/Telnet.
Let's take an example when the router's web interface works on standard port 80, and access to it from the Internet will be performed through port 8181. In this case, the connection to the external WAN IP address on port 8181 will be forwarded to the local IP address and port 80.
To do this, in the web interface on the 'Forwarding' page, create the following rule:
In the 'Input' field, you should specify the interface for connecting to the Internet. In most cases, you should choose the 'Provider' interface. If you have a connection to the Internet via PPPoE, PPTP or L2TP, you should choose the appropriate connection. When connecting via a 3G/4G USB modem, you have to specify exactly this connection, and when connecting via WISP, you have to choose a connection with the name of the network to which Keenetic is connected.
In the 'Output' field, select 'This Keenetic'. In this case, port forwarding will be performed to the local IP address of the router.
Set the value to 'TCP' in the 'Protocol' field.
In the 'Rule type' set 'Single port' and in the 'Open the port' field, specify the new port number.
In the field 'Destination port', enter the current control port number (in our case, it is 80).
Now to connect to the Keenetic's web interface from the Internet, you will need to use an address as follows:
For example 126.96.36.199:8181