16 de Octubre de 2017, 09:01:14 pm
  • WPSdb - Base de Datos de Pines Online

Autor Tema: Edicar configuración de UniFi desde SSH  (Leído 1015 veces)

Desconectado D3M0N

  • Founder
  • Usuario
  • *
  • Mensajes: 3.114
  • Reputación: +247/-3
  • El Mate, La Netbook y Wi-Fi del Vecino!
  • awards Usuario con más de 2000 Posts! Miembro registrado desde 2010 Usuario Registrado
    • Arg-Wireless.com.ar
    • Awards
Edicar configuración de UniFi desde SSH
« en: 01 de Febrero de 2016, 05:34:21 pm »

Editar archivo de configuración por SSH:

Borrar archivo original:

Código: [Seleccionar]
rm /tmp/system.cfg
touch /tmp/system.cfg

Codigo:
Código: [Seleccionar]
echo "# bridge" >> /tmp/system.cfg
echo "# connectivity" >> /tmp/system.cfg
echo "# dhcpc" >> /tmp/system.cfg
echo "# ebtables" >> /tmp/system.cfg
echo "# iptables" >> /tmp/system.cfg
echo "# misc" >> /tmp/system.cfg
echo "# netconf" >> /tmp/system.cfg
echo "# ntpclient" >> /tmp/system.cfg
echo "# qos" >> /tmp/system.cfg
echo "# redirector" >> /tmp/system.cfg
echo "# resolv" >> /tmp/system.cfg
echo "# route" >> /tmp/system.cfg
echo "# syslog" >> /tmp/system.cfg
echo "# system" >> /tmp/system.cfg
echo "# ubntroam" >> /tmp/system.cfg
echo "# unifi" >> /tmp/system.cfg
echo "# users" >> /tmp/system.cfg
echo "# vlan" >> /tmp/system.cfg
echo "# wlans (radio)" >> /tmp/system.cfg
echo "aaa.1.br.devname=br0" >> /tmp/system.cfg
echo "aaa.1.devname=ath0" >> /tmp/system.cfg
echo "aaa.1.driver=madwifi" >> /tmp/system.cfg
echo "aaa.1.ssid=vport-0418D686E6C0" >> /tmp/system.cfg
echo "aaa.1.status=disabled" >> /tmp/system.cfg
echo "aaa.2.br.devname=br0" >> /tmp/system.cfg
echo "aaa.2.devname=ath1" >> /tmp/system.cfg
echo "aaa.2.driver=madwifi" >> /tmp/system.cfg
echo "aaa.2.ssid=UniFi-CAMBIO" >> /tmp/system.cfg
echo "aaa.2.status=disabled" >> /tmp/system.cfg
echo "aaa.status=enabled" >> /tmp/system.cfg
echo "bridge.1.devname=br0" >> /tmp/system.cfg
echo "bridge.1.fd=1" >> /tmp/system.cfg
echo "bridge.1.port.1.devname=eth0" >> /tmp/system.cfg
echo "bridge.1.port.2.devname=eth1" >> /tmp/system.cfg
echo "bridge.1.port.3.devname=ath0" >> /tmp/system.cfg
echo "bridge.1.port.4.devname=ath1" >> /tmp/system.cfg
echo "bridge.1.stp.status=disabled" >> /tmp/system.cfg
echo "bridge.status=enabled" >> /tmp/system.cfg
echo "connectivity.status=enabled" >> /tmp/system.cfg
echo "dhcpc.1.devname=br0" >> /tmp/system.cfg
echo "dhcpc.1.status=enabled" >> /tmp/system.cfg
echo "dhcpc.status=enabled" >> /tmp/system.cfg
echo "ebtables.1.cmd=-t broute -A BROUTING --in-interface ath0 --proto 0x888e -j DROP" >> /tmp/system.cfg
echo "ebtables.2.cmd=-t nat -A PREROUTING --in-interface ath1 -d BGA -j DROP" >> /tmp/system.cfg
echo "ebtables.3.cmd=-t nat -A POSTROUTING --out-interface ath1 -d BGA -j DROP" >> /tmp/system.cfg
echo "ebtables.status=enabled" >> /tmp/system.cfg
echo "iptables.status=disabled" >> /tmp/system.cfg
echo "locale.timezone=UTC" >> /tmp/system.cfg
echo "netconf.1.autoip.status=disabled" >> /tmp/system.cfg
echo "netconf.1.devname=br0" >> /tmp/system.cfg
echo "netconf.1.ip=0.0.0.0" >> /tmp/system.cfg
echo "netconf.1.status=enabled" >> /tmp/system.cfg
echo "netconf.1.up=enabled" >> /tmp/system.cfg
echo "netconf.2.autoip.status=disabled" >> /tmp/system.cfg
echo "netconf.2.devname=eth0" >> /tmp/system.cfg
echo "netconf.2.ip=0.0.0.0" >> /tmp/system.cfg
echo "netconf.2.promisc=enabled" >> /tmp/system.cfg
echo "netconf.2.status=enabled" >> /tmp/system.cfg
echo "netconf.2.up=enabled" >> /tmp/system.cfg
echo "netconf.3.autoip.status=disabled" >> /tmp/system.cfg
echo "netconf.3.devname=eth1" >> /tmp/system.cfg
echo "netconf.3.ip=0.0.0.0" >> /tmp/system.cfg
echo "netconf.3.promisc=enabled" >> /tmp/system.cfg
echo "netconf.3.status=enabled" >> /tmp/system.cfg
echo "netconf.3.up=enabled" >> /tmp/system.cfg
echo "netconf.4.autoip.status=disabled" >> /tmp/system.cfg
echo "netconf.4.devname=ath0" >> /tmp/system.cfg
echo "netconf.4.ip=0.0.0.0" >> /tmp/system.cfg
echo "netconf.4.promisc=enabled" >> /tmp/system.cfg
echo "netconf.4.status=enabled" >> /tmp/system.cfg
echo "netconf.4.up=disabled" >> /tmp/system.cfg
echo "netconf.5.autoip.status=disabled" >> /tmp/system.cfg
echo "netconf.5.devname=ath1" >> /tmp/system.cfg
echo "netconf.5.ip=0.0.0.0" >> /tmp/system.cfg
echo "netconf.5.promisc=enabled" >> /tmp/system.cfg
echo "netconf.5.status=enabled" >> /tmp/system.cfg
echo "netconf.5.up=enabled" >> /tmp/system.cfg
echo "netconf.status=enabled" >> /tmp/system.cfg
echo "ntpclient.1.server=0.ubnt.pool.ntp.org" >> /tmp/system.cfg
echo "ntpclient.1.status=enabled" >> /tmp/system.cfg
echo "ntpclient.status=enabled" >> /tmp/system.cfg
echo "qos.status=disabled" >> /tmp/system.cfg
echo "radio.1.ack.auto=disabled" >> /tmp/system.cfg
echo "radio.1.acktimeout=64" >> /tmp/system.cfg
echo "radio.1.ampdu.status=enabled" >> /tmp/system.cfg
echo "radio.1.antenna.gain=6" >> /tmp/system.cfg
echo "radio.1.bcmc_l2_filter.status=enabled" >> /tmp/system.cfg
echo "radio.1.bgscan.status=disabled" >> /tmp/system.cfg
echo "radio.1.channel=1" >> /tmp/system.cfg
echo "radio.1.clksel=1" >> /tmp/system.cfg
echo "radio.1.countrycode=840" >> /tmp/system.cfg
echo "radio.1.cwm.enable=0" >> /tmp/system.cfg
echo "radio.1.cwm.mode=0" >> /tmp/system.cfg
echo "radio.1.devname=ath0" >> /tmp/system.cfg
echo "radio.1.forbiasauto=0" >> /tmp/system.cfg
echo "radio.1.ieee_mode=11nght20" >> /tmp/system.cfg
echo "radio.1.mode=managed" >> /tmp/system.cfg
echo "radio.1.phyname=wifi0" >> /tmp/system.cfg
echo "radio.1.rate.auto=enabled" >> /tmp/system.cfg
echo "radio.1.rate.mcs=auto" >> /tmp/system.cfg
echo "radio.1.reg_obey=enabled" >> /tmp/system.cfg
echo "radio.1.rfscan=disabled" >> /tmp/system.cfg
echo "radio.1.status=enabled" >> /tmp/system.cfg
echo "radio.1.txpower=0" >> /tmp/system.cfg
echo "radio.1.txpower_mode=high" >> /tmp/system.cfg
echo "radio.1.ubntroam.status=disabled" >> /tmp/system.cfg
echo "radio.1.virtual.1.devname=ath1" >> /tmp/system.cfg
echo "radio.1.virtual.1.status=enabled" >> /tmp/system.cfg
echo "radio.countrycode=840" >> /tmp/system.cfg
echo "radio.status=enabled" >> /tmp/system.cfg
echo "redirector.status=disabled" >> /tmp/system.cfg
echo "resolv.host.1.name=UNIFIALIAS" >> /tmp/system.cfg
echo "resolv.nameserver.1.status=disabled" >> /tmp/system.cfg
echo "resolv.nameserver.2.status=disabled" >> /tmp/system.cfg
echo "resolv.status=enabled" >> /tmp/system.cfg
echo "route.status=enabled" >> /tmp/system.cfg
echo "syslog.level=7" >> /tmp/system.cfg
echo "syslog.status=enabled" >> /tmp/system.cfg
echo "system.timezone=UTC" >> /tmp/system.cfg
echo "ubntroam.macaddr=04:18:d6:86:e6:c0" >> /tmp/system.cfg
echo "ubntroam.mcastip=239.254.127.63" >> /tmp/system.cfg
echo "ubntroam.status=enabled" >> /tmp/system.cfg
echo "ubntroam.wiredev=br0" >> /tmp/system.cfg
echo "unifi.cfgcap_info=0x7" >> /tmp/system.cfg
echo "unifi.version=4.7.6" >> /tmp/system.cfg
echo "users.1.name=ubnt" >> /tmp/system.cfg
echo "users.1.password=VvpvCwhccFv6Q" >> /tmp/system.cfg
echo "users.1.status=enabled" >> /tmp/system.cfg
echo "users.status=enabled" >> /tmp/system.cfg
echo "vlan.status=disabled" >> /tmp/system.cfg
echo "wireless.1.addmtikie=disabled" >> /tmp/system.cfg
echo "wireless.1.authmode=1" >> /tmp/system.cfg
echo "wireless.1.autowds=disabled" >> /tmp/system.cfg
echo "wireless.1.devname=ath0" >> /tmp/system.cfg
echo "wireless.1.hide_ssid=true" >> /tmp/system.cfg
echo "wireless.1.is_guest=false" >> /tmp/system.cfg
echo "wireless.1.l2_isolation=disabled" >> /tmp/system.cfg
echo "wireless.1.mac_acl.policy=deny" >> /tmp/system.cfg
echo "wireless.1.mac_acl.status=enabled" >> /tmp/system.cfg
echo "wireless.1.mode=managed" >> /tmp/system.cfg
echo "wireless.1.parent=wifi0" >> /tmp/system.cfg
echo "wireless.1.pureg=1" >> /tmp/system.cfg
echo "wireless.1.puren=0" >> /tmp/system.cfg
echo "wireless.1.schedule_enabled=disabled" >> /tmp/system.cfg
echo "wireless.1.security=none" >> /tmp/system.cfg
echo "wireless.1.ssid=vport-0418D686E6C0" >> /tmp/system.cfg
echo "wireless.1.status=enabled" >> /tmp/system.cfg
echo "wireless.1.uapsd=disabled" >> /tmp/system.cfg
echo "wireless.1.usage=uplink" >> /tmp/system.cfg
echo "wireless.1.vport=enabled" >> /tmp/system.cfg
echo "wireless.1.vwire=disabled" >> /tmp/system.cfg
echo "wireless.1.wds=enabled" >> /tmp/system.cfg
echo "wireless.1.wmm=enabled" >> /tmp/system.cfg
echo "wireless.2.addmtikie=disabled" >> /tmp/system.cfg
echo "wireless.2.authmode=0" >> /tmp/system.cfg
echo "wireless.2.autowds=disabled" >> /tmp/system.cfg
echo "wireless.2.devname=ath1" >> /tmp/system.cfg
echo "wireless.2.hide_ssid=false" >> /tmp/system.cfg
echo "wireless.2.id=56af85c0b710b2afca2c554c" >> /tmp/system.cfg
echo "wireless.2.is_guest=false" >> /tmp/system.cfg
echo "wireless.2.l2_isolation=disabled" >> /tmp/system.cfg
echo "wireless.2.mac_acl.policy=deny" >> /tmp/system.cfg
echo "wireless.2.mac_acl.status=enabled" >> /tmp/system.cfg
echo "wireless.2.mode=master" >> /tmp/system.cfg
echo "wireless.2.parent=wifi0" >> /tmp/system.cfg
echo "wireless.2.pureg=1" >> /tmp/system.cfg
echo "wireless.2.puren=0" >> /tmp/system.cfg
echo "wireless.2.schedule_enabled=disabled" >> /tmp/system.cfg
echo "wireless.2.security=none" >> /tmp/system.cfg
echo "wireless.2.ssid=UniFi-CAMBIO" >> /tmp/system.cfg
echo "wireless.2.status=enabled" >> /tmp/system.cfg
echo "wireless.2.uapsd=disabled" >> /tmp/system.cfg
echo "wireless.2.usage=user" >> /tmp/system.cfg
echo "wireless.2.vport=disabled" >> /tmp/system.cfg
echo "wireless.2.vwire=disabled" >> /tmp/system.cfg
echo "wireless.2.wds=disabled" >> /tmp/system.cfg
echo "wireless.2.wmm=enabled" >> /tmp/system.cfg
echo "wireless.status=enabled" >> /tmp/system.cfg

Guardar y Aplicar + Reboot:
Código: [Seleccionar]
cfgmtd -w -f /tmp/system.cfg
reboot
« Última modificación: 01 de Febrero de 2016, 05:35:51 pm por D3M0N »
  • Antenas: Antena Komarov (Prototype), Antena Belgrain (MOD), Antenas 4, 5, 9dBi (omnis)
  • Sistemas Operativos: Microsoft Windows 7 Enterprice (x64), Ubuntu 14.10.1 LTS Desktop Edition 64-bit
  • Sistemas Operativos que utilizo para Auditar: Ubuntu 14.10.1 LTS Desktop Edition 64-bit
  • Dispositivos Inalambricos: Alfa AWUS036H 1W (USB); TP-Link TL-WN722N (USB); Ubiquiti Nanostation M2; Mikrotik RB951Ui-2HnD