Network port access description¶
Copyright © Quectel Wireless Solutions Co., Ltd. 2026. All rights reserved.
Open ports¶
For development and remote maintenance, the following TCP ports are open by default:
Port |
Transport protocol |
Description |
|---|---|---|
22 |
TCP |
SSH: Secure remote login, maintenance, debugging, and file transfer (SCP/ SFTP) |
3389 |
TCP |
RDP: Windows remote desktop (typically handled by services like xrdp on the board) |
5900 |
TCP |
VNC: Graphical remote desktop access |
💡 The port access rules above apply only to lab R&D, functional debugging, and local network (LAN) maintenance. If the device is connected to the public internet or deployed in production environments, ensure you follow the principle of least privilege: close high-risk graphical desktop ports such as 3389 and 5900, or restrict access strictly to allowlisted IP addresses.
View current firewall rules¶
Run the following command on the board:
sudo iptables-save
This shows the full rule set (chain policies and each INPUT rule). To view the rules as a list only, run:
sudo iptables -L -n -v
Normally, the default policy of the INPUT chain is DROP, with ACCEPT rules for ports such as 22, 3389, and 5900 (the actual output on your device prevails).
Example (excerpt, for reference only):
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 3389 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5900 -j ACCEPT
COMMIT
Add ports¶
The rules loaded at boot are usually stored in the following files:
IPv4: /etc/iptables/rules.v4.
IPv6: /etc/iptables/rules.v6.
Edit them as root, for example:
sudo vi /etc/iptables/rules.v4
sudo vi /etc/iptables/rules.v6
The *filter section of the IPv4 rules file is similar to the example above: It first allows established connections and loopback traffic, then adds ACCEPT rules per port.
Allow a TCP port¶
After -A INPUT -i lo -j ACCEPT and before COMMIT, add one line (replace <PORT> with the actual port, such as 80 or 443):
-A INPUT -p tcp -m tcp --dport <PORT> -j ACCEPT
It can also be written as follows (consistent with the export format of some systems):
-A INPUT -p tcp --dport <PORT> -j ACCEPT
Allow a UDP port¶
After -A INPUT -i lo -j ACCEPT and before COMMIT, add one line (replace <PORT> with the actual port, such as 53 or 123):
-A INPUT -p udp -m udp --dport <PORT> -j ACCEPT
Remove a port rule¶
Delete the corresponding -A INPUT ... --dport PORT ... line from the rules file. After saving, reload the service (see the next section) for the change to take effect permanently.
Note
Do not delete the RELATED,ESTABLISHED and lo (loopback) rules; Otherwise, return traffic and local services may be affected.
iptables-restore service¶
The board enables iptables-restore.service by default to restore the rules from rules.v4/ rules.v6 at boot.
Stop the service temporarily¶
To stop the service temporarily (for example, when troubleshooting network issues), run:
sudo systemctl stop iptables-restore.service
This is a temporary operation. If the service is still enabled, it starts again after a reboot and continues to restore the rules from rules.v4/ rules.v6.
Disable automatic start at boot (do not automatically load rules on reboot)¶
If you do not want the rules to be loaded automatically after a reboot, run:
sudo systemctl disable iptables-restore.service
After disable is run, the service no longer starts at boot and no longer applies rules.v4/ rules.v6 automatically.
To restore automatic loading at boot, run:
sudo systemctl enable iptables-restore.service
sudo systemctl start iptables-restore.service
Quick status check¶
# Enabled at boot or not
systemctl is-enabled iptables-restore.service
# Active now or not
systemctl is-active iptables-restore.service
Note
disable only affects whether the service starts at the next boot; It does not clear the rules currently in the kernel. Use sudo iptables -L -n to check the rules currently in effect.
Reload after editing the rules files¶
After editing the rules files, run:
sudo systemctl daemon-reload
sudo systemctl restart iptables-restore.service
sudo systemctl status iptables-restore.service
Then use sudo iptables -L -n or sudo iptables-save to confirm that the active rules match the files.
If the service fails, troubleshoot with the output of systemctl status and the logs, and make sure the syntax of /etc/iptables/rules.v4 is correct (each -A rule on its own line, and *filter paired with COMMIT).
Notes¶
The ports commonly opened for remote maintenance are 22 (SSH), 3389 (RDP), and 5900 (VNC); The actual output of sudo iptables-save on the device prevails.
To make changes permanent, edit /etc/iptables/rules.v4 (and rules.v6 if needed) and add or remove ***--***dport lines as shown above.
After editing, run systemctl restart iptables-restore.service and verify with sudo iptables -L -n.
systemctl stop iptables-restore.service is only a temporary measure; The rules are reloaded from the files after a reboot. For a lasting change, edit the files and restart the service.