Skip to content

Instantly share code, notes, and snippets.

@ruzickap
Created May 15, 2026 06:36
Show Gist options
  • Select an option

  • Save ruzickap/f0706a5cc2f7230b9f9adca5b00eed7e to your computer and use it in GitHub Desktop.

Select an option

Save ruzickap/f0706a5cc2f7230b9f9adca5b00eed7e to your computer and use it in GitHub Desktop.
OpenWrt WAN access using SSH
# 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