Created
May 15, 2026 06:36
-
-
Save ruzickap/f0706a5cc2f7230b9f9adca5b00eed7e to your computer and use it in GitHub Desktop.
OpenWrt WAN access using SSH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set root password | |
| passwd | |
| # Enable SSH access from the WAN | |
| wget https://github.com/ruzickap.keys -O /etc/dropbear/authorized_keys | |
| cat >> /etc/config/firewall << 'EOF' | |
| config rule | |
| option name 'Allow-SSH' | |
| option src 'wan' | |
| option target 'ACCEPT' | |
| option proto 'tcp' | |
| option dest_port '22' | |
| config redirect | |
| option name 'Allow-SSH-22222' | |
| option src 'wan' | |
| option proto 'tcp' | |
| option src_dport '22222' | |
| option dest 'lan' | |
| option dest_port '22' | |
| EOF | |
| /etc/init.d/firewall restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment