# Generat per a:
# DD-guifi
#
# unsolclic version: v3.7
# obre una sessió telnet/ssh en el teu trasto i executa aquest script.
# Nota: Fes servir l'Status/Wireless survey per verificar que
# tens l'antena ben endollada i configurada. La dreta es probablement
# la que tens a la dreta si el mires des del davant (on hi han els
# leds). Si et cal, canvia el connector des de la configuració via
# anant a Wireless->Advanced Settings.
# Security notes:
# Once this script is executes, the router password for root/admin users is "guifi"
# You must change this password if you want to keep it secret. If you like to still
# be managed externally, you must install a trusted ssh key. Upon request, your setup
# might be asked for being inspected to check the Wireless Commons compliance.
# No firewall rules are allowed in the public network area.
# By being in client mode, the router has the firewall enabled to distinguish between
# private and public areas, and only SNMP, ssh and https 8080 ports are enabled
# for external administration. Everything else is closed, therefore you might
# have to open ports to share resources.
#
# TonaCastellEst2
# Paràmetres globals de la xarxa
nvram set router_name="TonaCastellEst2"
nvram set wan_hostname="TonaCastellEst2"
nvram set lan_ipaddr="10.138.63.193"
nvram set lan_gateway="0.0.0.0"
nvram set lan_netmask="255.255.255.224"
nvram set wan_proto="disabled"
nvram set lan_domain="guifi.net"
nvram set wan_domain="guifi.net"
nvram set http_passwd="guifi"
nvram set time_zone="+01 2 2"
nvram set sv_localdns="10.138.38.211"
nvram set wl_net_mode="b-only"
nvram set wl0_net_mode="b-only"
nvram set wl_afterburner="on"
nvram set wl_frameburst="on"
nvram set txpwr="28"
nvram set txant="0"
nvram set wl0_antdiv="0"
nvram set wl_antdiv="0"
nvram set block_wan="0"
#
# Gestió
nvram set telnetd_enable="1"
nvram set sshd_enable="1"
nvram set sshd_passwd_auth="1"
nvram set remote_management="1"
nvram set remote_mgt_https="1"
nvram set snmpd_enable="1"
nvram set snmpd_sysname="guifi.net"
nvram set snmpd_syscontact="guifi_at_guifi.net"
nvram set boot_wait="on"
# This is just a fake key. You must install a trusted key if you like to have you router managed externally
nvram set sshd_authorized_keys="
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwWNX4942fQExw4Hph2M/sxOAWVE9PB1I4JnNyhoWuF9v\
id0XcU34kwWqBBlI+LjDErCQyaR4ysFgDX61V4kUuCKwBOMp+UGxhL648VTv5Qji/YwvIzt7nguUOZ5A\
GPISqsC0717hc0Aja1mvHkQqg9aXKznmszmyKZGhcm2+SU8= root@bandoler.guifi.net\
"
nvram set http_enable="1"
nvram set https_enable="1"
#
# NTP Network time protocol
nvram set ntp_enable="1"
nvram set ntp_server="10.138.38.211"
#
# Mode AP
nvram set wl_mode="ap"
nvram set wl0_mode="ap"
nvram set wl_channel="10"
nvram set wl_ssid="guifi.net-TonaCastellAP"
nvram set wl_macmode="disable"
nvram set wl0_macmode="disable"
nvram set wl_macmode1="disable"
nvram set wl0_macmode1="disable"
#
# Tallafocs desactivat
nvram set filter="off"
# DD-guifi OSPF routing
nvram set dr_setting="3"
nvram set dr_lan_rx="1 2"
nvram set dr_lan_tx="1 2"
nvram set dr_wan_rx="1 2"
nvram set dr_wan_tx="1 2"
nvram set wk_mode="ospf"
nvram set routing_lan="on"
nvram set routing_wan="on"
nvram set routing_ospf="on"
nvram set ospfd_conf="
!
password guifi
enable password guifi
!
interface br0
interface br0:1
interface vlan2
interface vlan3
interface vlan4
interface vlan1
!
router ospf
ospf router-id 10.138.63.193
network 10.138.63.192/27 area 0
default-information originate
!
line vty
!"
#
# DHCP
nvram set static_leases="FF:FF:FF:FF:FF:FF=TonaSMorenoRadio1=10.138.63.195 FF:FF:FF:FF:FF:FF=TonaSRieraRadio1=10.138.63.196 00:15:00:07:4E:2A=TonaMPilarRd1=10.138.63.197 00:1D:7E:28:11:8B=TonaBaulenasSerraRadio1=10.138.63.198 FF:FF:FF:FF:FF:FF=TonaMCPuigRadio1=10.138.63.199 00:15:6D:AD:DA:02=TonaJordiFRd1=10.138.63.202 FF:FF:FF:FF:FF:FF=TonaGBaucellsRadio1=10.138.63.203 00:16:01:AF:FF:A6=TonaManelDiazRadio1=10.138.63.204 00:11:22:33:44:56=TonaMFuentesRd2=10.138.63.206 00:15:6D:1A:67:24=TonasayosRd1=10.138.63.207 00:15:6D:DB:A2:5F=HostaletsTosqRd1=10.138.63.208 00:15:6D:A9:2C:37=TonaFRocaRd1=10.138.63.209 00:15:6D:A9:28:E2=TonaMSellaresRd1=10.138.63.210 00:13:49:00:01:03=TonaESalaRd1=10.138.63.211 00:9E:00:0B:57:99=TonaEnvernissatsRRd1=10.138.63.212 00:13:49:00:01:03=TonaJAznarRd1=10.138.63.213 00:15:6D:AC:68:9F=TonaEsterRd1=10.138.63.214 00:15:6D:AB:68:7C=TonaSAnfoudRd1=10.138.63.216 "
nvram set static_leasenum="18"
nvram set dhcp_start="221"
#
#
nvram set rc_startup="#!/bin/ash
#
# unsolclic: v3.7
# radio: 6463-TonaCastellEst2
#
#
/bin/sleep 10
/usr/sbin/wl shortslot_override 0
ifconfig eth1 -promisc -allmulti
ifconfig br0 -promisc -allmulti
ifconfig eth0 promisc"
#
# Fi del script i re-iniciar
nvram commit
reboot