Created
April 13, 2014 17:04
-
-
Save ruzickap/10592761 to your computer and use it in GitHub Desktop.
OpenWrt system and firewall changes
This file contains 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
#Configure ssh key autologin: | |
ssh-copy-id -i ~/.ssh/id_rsa [email protected] | |
uci set system.@system[0].hostname=gate | |
uci add_list sshd.@openssh[0].Port=2222 | |
uci add firewall rule | |
uci set firewall.@rule[-1].name=ssh | |
uci set firewall.@rule[-1].src=wan | |
uci set firewall.@rule[-1].target=ACCEPT | |
uci set firewall.@rule[-1].proto=tcp | |
uci set firewall.@rule[-1].dest_port=2222 | |
uci add firewall redirect | |
uci set firewall.@redirect[-1].name=ssh_lan | |
uci set firewall.@redirect[-1].src=lan | |
uci set firewall.@redirect[-1].proto=tcp | |
uci set firewall.@redirect[-1].src_dport=22 | |
uci set firewall.@redirect[-1].dest_port=2222 | |
uci set firewall.@redirect[-1].dest_ip=192.168.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment