Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # configuration script for wrt54g
- # vim: set foldmethod=marker et :
- # {{{ network
- uci set network.lan.ipaddr='10.0.0.1'
- uci set network.lan.ip6addr='2001:6f8:11c0:0:21e:e5ff:fe46:798/64'
- uci set network.wan.proto='pppoe'
- uci set network.wan.username='04216842013'
- uci set network.wan.password='25031957'
- # *** access speedport using ssh with SOCKS for 192.168.0.1
- uci set network.speedport='interface'
- uci set network.speedport.ifname='eth0.1'
- uci set network.speedport.proto='dhcp'
- uci set wireless.wl0.disabled=0
- uci set wireless.@wifi-iface[0].ssid='betelgeuse'
- uci set wireless.@wifi-iface[0].encryption='psk+psk2'
- uci set wireless.@wifi-iface[0].key='eta-orionis'
- # }}}
- # {{{ dropbear
- uci set dropbear.@dropbear[0].PasswordAuth='off'
- echo "ssh-dss AAAAB3NzaC1kc3MAAACBAM/d56B9fq8X3S+Vk1125gbqFx2n6yKXu+vk7bNib97SNb3W3kDaydPgHE3v03neK6jtENPOg/NbduvGot7wlpdaYaaPA7wwoYSYT3zsxRYr+AGJd9gHxPJo4whhuESrzTHlHF1QCreFTwb+L2f2qSfmvM905pXejQuGRg6aevOZAAAAFQDEYcj2Oa3rR5J3FDMnPkp6jL66QQAAAIEAorzhmB5fyiypEioQlHJbe1T2ahwZkWAD8gX3dDhDTr0rKOdcEj5S9MyDVwTQaC4+rfSykUkQoiOnPjQXWe5XA6EIzyg9froD3bAiWDAonRDOcaPqpDKf3TUax2cQHnBbWD6CJEel51++G+GBwv/K8tFiKEkMFf7LwoDxHwj1RTgAAACAczhhQQbjpwmIzeH6Hm6otiR8OfrX7xNDHbt5qckMDuCon3lEU1nL121fjss6wX7jahx9ju3aIrpcIo4/EBxKGYVBn2WCnlGmZerlX3g198H43km+C4vnVTVIiv9ol8pXMXCgqtheFSyIg+WVEVBucewRhSQNH/PpuLmylkuBsw8= christoph@thinkpad" > /etc/dropbear/authorized_keys
- rm -f /etc/banner
- # }}}
- # {{{ system
- uci set system.@system[0].hostname='wrt54g'
- uci set system.@system[0].timezone='CET-1CEST,M3.5.0,M10.5.0/3'
- # }}}
- # {{{ hosts
- cat > /etc/hosts.local <<EOF
- 127.0.0.1 localhost.
- 10.0.0.1 wrt54g
- 2001:6f8:11c0:0:21e:e5ff:fe46:798 wrt54g
- EOF
- # }}}
- # {{{ profile
- cat > /etc/profile <<EOF
- #!/bin/sh
- export PATH=/bin:/sbin:/usr/bin:/usr/sbin
- export HOME=\$(grep -e "^\${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
- export HOME=\${HOME:-/root}
- export PS1='\[\\033[01;31m\]\u@\h\[\\033[00m\]:\[\\033[01;34m\]\w\[\\033[00m\]$ '
- [ -x /bin/more ] || alias more=less
- [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi
- [ -z "\$KSH_VERSION" -o \! -s /etc/mkshrc ] || . /etc/mkshrc
- [ -x /sbin/arp ] || arp() { cat /proc/net/arp; }
- [ -z /bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 \$*; }
- EOF
- # }}}
- # {{{ aiccu
- uci set aiccu.@aiccu[0].username='CPX1-SIXXS'
- uci set aiccu.@aiccu[0].password='Iha6JG$sixxs'
- uci set aiccu.@aiccu[0].protocol='tic'
- uci set aiccu.@aiccu[0].interface='sixxs'
- uci set aiccu.@aiccu[0].tunnel_id='T14974'
- uci set aiccu.@aiccu[0].defaultroute=1
- uci set aiccu.@aiccu[0].nat=1
- uci set aiccu.@aiccu[0].heartbeat=1
- rm -f /etc/rc.d/S50aiccu
- echo > /etc/ppp/ip-up.d/aiccu <<EOF
- #!/bin/sh
- /etc/init.d/aiccu restart
- EOF
- chmod +x /etc/ppp/ip-up.d/aiccu
- # }}}
- # {{{ radvd
- uci set radvd.@interface[0].ignore=0
- uci set radvd.@prefix[0].interface='lan'
- uci set radvd.@prefix[0].prefix='2001:6f8:11c0:0::/64'
- uci set radvd.@prefix[0].AdvOnLink=1
- uci set radvd.@prefix[0].AdvAutonomous=1
- uci set radvd.@prefix[0].AdvRouterAddr=1
- uci set radvd.@prefix[0].ignore=0
- # }}}
- # {{{ enable ipv6 forwarding
- sed -i -e 's/# net.ipv6.conf.all.forwarding=1/net.ipv6.conf.all.forwarding=1/' /etc/sysctl.conf
- sysctl -p >/dev/null
- # }}}
- # {{{ qos
- uci set qos.wan.enabled=1
- uci set qos.wan.upload=1024
- uci set qos.wan.download=16000
- # }}}
- # {{{ firewall
- cat > /etc/firewall.user <<EOF
- THINKPAD=10.0.0.167
- ## transmission
- iptables -t nat -A prerouting_wan -p tcp --dport 51413 -j DNAT --to \$THINKPAD
- iptables -A forwarding_wan -p tcp --dport 51413 -d \$THINKPAD -j ACCEPT
- EOF
- # }}}
- # {{{ commit uci settings
- uci commit
- # }}}
Add Comment
Please, Sign In to add comment