📌 Purpose #
This document explains how to use an SSH tunnel through a MikroTik router to access the web interface of devices located on an internal network that is not directly reachable from the local computer.
Common use cases include:
- Yealink phones
- Poly phones
- Grandstream phones
- PBXs
- Managed switches
- Firewalls
- Network appliances
Network Overview #
In this scenario:
- The remote computer can connect to the MikroTik router via SSH.
- The target device is located on an internal network.
- Direct access to the device’s web interface is not possible.
- An SSH tunnel is used to securely forward web traffic through the MikroTik.
Example topology:
Remote Computer
|
| SSH Tunnel
|
MikroTik Router
|
| Internal Network
|
Target Device
🔧 Requirements #
Before proceeding, obtain:
- MikroTik IP address
- MikroTik SSH username
- MikroTik SSH password or SSH key
- IP address of the target device
- Confirmation that the web interface is enabled
Step 1: Verify Connectivity from the MikroTik #
Connect to the MikroTik using PuTTY.
Verify that the MikroTik can reach the target device:
ping <Device_IP>
Example:
ping 192.168.100.50
If the device does not respond, verify routing, VLAN configuration, and firewall rules before continuing.
Step 2: Configure the SSH Tunnel #
Open PuTTY and configure:
- Host Name: MikroTik IP
- Port: 22
- Connection Type: SSH
Navigate to:
Connection > SSH > Tunnels
HTTP Web Access (Port 80) #
If the device uses HTTP:
Source Port
8080
Destination
192.168.100.50:80
Click Add.
You should see:
L8080 192.168.100.50:80
Return to the Session page and connect to the MikroTik.
HTTPS Web Access (Port 443) #
If the device uses HTTPS:
Source Port
8443
Destination
192.168.100.50:443
Click Add.
You should see:
L8443 192.168.100.50:443
Connect to the MikroTik.
Step 3: Access the Device #
HTTP Example #
Open a web browser and navigate to:
http://127.0.0.1:8080
HTTPS Example #
Open a web browser and navigate to:
https://127.0.0.1:8443
The connection will be securely forwarded through the MikroTik to the target device.
✅ Common Port Examples #
| Service | Device Port | Local Tunnel Port |
|---|---|---|
| HTTP Web Interface | 80 | 8080 |
| HTTPS Web Interface | 443 | 8443 |
| SSH | 22 | 2222 |
| Alternate HTTP Service | 8080 | 8081 |
Note: The local tunnel port can be any unused port on your computer. It does not need to match the destination port.
⚠️ Troubleshooting #
Browser Cannot Connect #
Verify:
- The SSH tunnel is active
- The device IP address is correct
- The web service is enabled on the device
- The MikroTik can reach the device
Tunnel Connects but Page Does Not Load #
Verify:
- Correct destination port (80 or 443)
- Firewall rules allow access
- VLAN routing is functioning properly
Certificate Warning #
When using HTTPS, a certificate warning may appear if the device uses a self-signed certificate. This is expected in many internal network environments.
📝 Summary #
SSH tunneling allows technicians to securely access web interfaces on devices located behind a MikroTik router without requiring direct network access. This method is commonly used for managing phones, PBXs, switches, and other network equipment on isolated VLANs or internal subnets.
📌 Purpose #
This document explains how to use an SSH tunnel through a MikroTik router to access the web interface of devices located on an internal network that is not directly reachable from the local computer.
Common use cases include:
- Yealink phones
- Poly phones
- Grandstream phones
- PBXs
- Managed switches
- Firewalls
- Network appliances
Network Overview #
In this scenario:
- The remote computer can connect to the MikroTik router via SSH.
- The target device is located on an internal network.
- Direct access to the device’s web interface is not possible.
- An SSH tunnel is used to securely forward web traffic through the MikroTik.
Example topology:
Remote Computer
|
| SSH Tunnel
|
MikroTik Router
|
| Internal Network
|
Target Device
🔧 Requirements #
Before proceeding, obtain:
- MikroTik IP address
- MikroTik SSH username
- MikroTik SSH password or SSH key
- IP address of the target device
- Confirmation that the web interface is enabled
Step 1: Verify Connectivity from the MikroTik #
Connect to the MikroTik using PuTTY.
Verify that the MikroTik can reach the target device:
ping <Device_IP>
Example:
ping 192.168.100.50
If the device does not respond, verify routing, VLAN configuration, and firewall rules before continuing.
Step 2: Configure the SSH Tunnel #
Open PuTTY and configure:
- Host Name: MikroTik IP
- Port: 22
- Connection Type: SSH
Navigate to:
Connection > SSH > Tunnels
HTTP Web Access (Port 80) #
If the device uses HTTP:
Source Port
8080
Destination
192.168.100.50:80
Click Add.
You should see:
L8080 192.168.100.50:80
Return to the Session page and connect to the MikroTik.
HTTPS Web Access (Port 443) #
If the device uses HTTPS:
Source Port
8443
Destination
192.168.100.50:443
Click Add.
You should see:
L8443 192.168.100.50:443
Connect to the MikroTik.
Step 3: Access the Device #
HTTP Example #
Open a web browser and navigate to:
http://127.0.0.1:8080
HTTPS Example #
Open a web browser and navigate to:
https://127.0.0.1:8443
The connection will be securely forwarded through the MikroTik to the target device.
✅ Common Port Examples #
| Service | Device Port | Local Tunnel Port |
|---|---|---|
| HTTP Web Interface | 80 | 8080 |
| HTTPS Web Interface | 443 | 8443 |
| SSH | 22 | 2222 |
| Alternate HTTP Service | 8080 | 8081 |
Note: The local tunnel port can be any unused port on your computer. It does not need to match the destination port.
⚠️ Troubleshooting #
Browser Cannot Connect #
Verify:
- The SSH tunnel is active
- The device IP address is correct
- The web service is enabled on the device
- The MikroTik can reach the device
Tunnel Connects but Page Does Not Load #
Verify:
- Correct destination port (80 or 443)
- Firewall rules allow access
- VLAN routing is functioning properly
Certificate Warning #
When using HTTPS, a certificate warning may appear if the device uses a self-signed certificate. This is expected in many internal network environments.
📝 Summary #
SSH tunneling allows technicians to securely access web interfaces on devices located behind a MikroTik router without requiring direct network access. This method is commonly used for managing phones, PBXs, switches, and other network equipment on isolated VLANs or internal subnets.