SSH Port Forwarding Not Working: Troubleshooting Guide for Fedora 39 and Linksys WRT32X Router
This article will guide you through the process of troubleshooting SSH port forwarding issues when using a Fedora 39 server with the SSH daemon and a Linksys WRT32X router running OpenWRT 23.05.x. The focus of this article is to provide a detailed context of the topic, covering key concepts, subtitles, and paragraphs. Code blocks, when necessary, will be enclosed within tags, and properly formatted according to the programming language used.
1. Verify SSH Configuration on Fedora 39 Server
The first step in troubleshooting SSH port forwarding issues is to verify the SSH configuration on the Fedora 39 server. Ensure that the SSH daemon is running and properly configured to allow remote connections. You can check the status of the SSH daemon using the following command:
sudo systemctl status sshd
If the SSH daemon is not running, you can start it using the following command:
sudo systemctl start sshd
2. Check Firewall Settings
By default, Fedora 39 comes with a firewall enabled. If the firewall is blocking incoming connections, SSH port forwarding will not work. You can check the firewall settings using the following command:
sudo firewall-cmd --list-all
If the firewall is blocking incoming connections on the SSH port, you can allow incoming connections using the following command:
sudo firewall-cmd --permanent --add-service=ssh
After adding the rule, you need to reload the firewall using the following command:
sudo firewall-cmd --reload
3. Configure Port Forwarding on Linksys WRT32X Router
After verifying the SSH configuration and firewall settings on the Fedora 39 server, the next step is to configure port forwarding on the Linksys WRT32X router. To do this, follow these steps:
- Log in to the router's web interface.
- Navigate to the "Network" section and select "Port Forwarding".
- Add a new port forwarding rule for the SSH port (default is 22).
- Specify the internal IP address of the Fedora 39 server and the SSH port number.
- Save the changes and apply the new configuration.
4. Test SSH Port Forwarding
After configuring port forwarding on the Linksys WRT32X router, you can test SSH port forwarding using the following command:
ssh -p @
Replace port_number with the SSH port number, username with your username, and external_ip_address with the external IP address of the Linksys WRT32X router. If SSH port forwarding is working correctly, you will be prompted to enter your password and be able to connect to the Fedora 39 server.
SSH port forwarding issues can be caused by a variety of factors, including incorrect SSH configuration, firewall settings, and router configuration. By following the steps outlined in this article, you can troubleshoot SSH port forwarding issues and ensure that remote connections are secure and reliable. It is important to regularly check and update the SSH configuration and firewall settings on the Fedora 39 server and configure port forwarding on the Linksys WRT32X router to ensure that remote connections are secure and reliable.