sábado, 12 de abril de 2014

HG556a

Openwrt-lede 17.01.5

Instalar:


opkg install luci-app-samba hdparm kmod-usb-storage kmod-fs-ext4 block-mount smartmontools usbutils luci-app-samba luci-app-minidlna

Adblock : https://www.reddit.com/r/openwrt/comments/7q0ylm/is_there_a_simple_way_to_setup_adblocking_at_a/

Si se pierda la wifi para siempre se puede recuperar segun esto: http://openwrt.tuinstituto.es/no-reconoce-tarjeta-wifi-en-hg556a

1- Flashear esta version del 12 -> openwrt-HW556-squashfs-cfe_r33275_wlan_restore.bin que no permite ser actualizada, al terminar las operaciones flasear desde CFE (encender router con boton resetar presionado por mas de 12 segs e ir a 192.168.1.1...)

2- Buscar tu chip seun la tabla: dmesg | grep Manufacturer

Debemos fijarnos en el Chip ID y buscarlo en esta tabla.
Chip ID Memoria Flash
0x00227e MX29GL128EH
0x00227a MX29LV128DB
0x002101 S29GL128P10



3- mtd -r erase cal_data  (borrar)
4-   
     dd if=/etc/atheros_MX29GL128EH.bin of=/dev/mtd4  (recuperar)
     
    dd if=/etc/atheros_S29GL128P10.bin of=/dev/mtd4


tras reiniciar y probar a conectarte a una wifi como cliente

Flasear con Lede 17.04.5 (opcion B), he probado con 18.06.1 y solo aguanta un reinicio, luego se pierde, y antes hy que pasar por 17.04.5 si quieres ver la wifi en el primer inicio activada en 18.06.1...

El problema es que minidlna ha desaparecido de packages en 17.04.? por culpa de la libffmpeg que tiene movidas de licencias..??? en 18.06 si está el minidlna pero no puedeo hacer huida hacia adelante, asi que esto tiene los dias contados...



 
******************************



r40422


NO muestra wifi:
http://foro.seguridadwireless.net/openwrt/openwrt-en-huaweig-hg556a/1180/

Hay que instalar kmod-ath9k y wpad-mini y rebotar

http://foro.seguridadwireless.net/openwrt/openwrt-en-huaweig-hg556a/360/
No os fijéis en las MACs del WLAN, pueden variar incluso en el mismo modelo.
Fijáos en las MACs del ethernet:
5c:4c:a9 -> Atheros/MX29GL128EH
f4:c7:14 -> Atheros/S29GL128P10
00:25:68 -> Atheros/MX29LV128DB
84:a8:e4 -> Ralink


cd /tmp/
wget http://downloads.openwrt.org/snapshots/trunk/brcm63xx/openwrt-HW556-squashfs-cfe.bin
sysupgrade /tmp/openwrt-HW556-squashfs-cfe.bin

mtd erase -r rootfs_data && reboot (borrar config)

cd /etc/config
vi network

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
#  option proto 'dhcp'
        option ipaddr '192.168.5.6'
        option netmask '255.255.255.0'
        option 'gateway' '192.168.5.1'  
        option 'dns' '8.8.8.8'           
                         


/etc/init.d/firewall stop
/etc/init.d/firewall disable


opkg update

opkg install luci luci-app-samba kmod-ath9k kmod-usb2 kmod-fs-ext4 kmod-usb-storage block-mount swap-utils kmod-fs-cifs e2fsprogs transmission-web transmission-remote

ver antigua:
opkg install luci luci-app-samba kmod-ath9k kmod-usb2 kmod-fs-ext4 kmod-usb-storage block-mount swap-utils kmod-fs-cifs kmod-nls-utf8 kmod-nls-cp850 kmod-nls-iso8859-15 e2fsprogs transmission-web transmission-remote

/etc/init.d/uhttpd enable  (Habilitado en el inicio - luci)
/etc/init.d/uhttpd start  (Arranco el servicio - luci)


Montar disco y crear share desde Luci


chmod -R 766 /mnt*
chown -R nobody:nogroup /mnt*

mount -t ext4 /dev/sda1 /mnt/share -o rw,sync

/etc/init.d/samba enable
/etc/init.d/samba start


mkdir /mnt/share
chmod -R 777 /mnt*
chown -R nobody:nogroup /mnt*

/etc/init.d/fstab enable
/etc/init.d/fstab start


/etc/init.d/transmission enable
/etc/init.d/transmission start

NFS SERVER

opkg update
opkg install nfs-kernel-server nfs-kernel-server-utils unfs3

vi /etc/exports:

/mnt/sdb1 192.168.5.0/255.255.255.0(rw,all_squash,insecure,sync,no_subtree_check)

ejecutar

/etc/init.d/portmap enable
/etc/init.d/nfsd enable
/etc/init.d/portmap start
/etc/init.d/nfsd start
/etc/init.d/unfs3 start

reboot

Para montar en PC

showmount -e 192.168.5.6 -> muestra lo que comparte el openwrt

crear carpeta a montar

sudo mkdir /media/nfs

sudo mount -o nolock -t nfs 192.168.5.6:/mnt/sdb1 /media/nfs

TUNING NFS (esto no funciona)

/etc/init.d/nfsd stop
mount -t nfsd nfsd /proc/fs/nfsd
echo 4  > /proc/fs/nfsd/threads
echo 32768  > /proc/fs/nfsd/max_block_size

FTP

opkg install pure-ftpd

vi /etc/config/pure-ftpd

config pure-ftpd
        option port             '21'
        option noanonymous      '0'
        option chrooteveryone   '1'
        option maxclientsperip  '10'
        option maxclientsnumber '4'
        option peruserlimits    '3:4'
        option umask            '133:022'
        option authentication   'puredb:/etc/pureftpd.pdb'
        option syslogfacility   'none'
        option altlog           'stats:/var/log/pureftpd.log'
        option enabled          '1'

crontab -e
#cambiar permisos de la carpeta para poder entrar por samba
*/1 * * * * chmod 777 /mnt/sda1/ftp/* -R


Si hubiese que ditar usuarios y grupos ftp:

    vi /etc/passwd
    vi /etc/group

Crear usuario virtual para pure-ftp:

    pure-pw useradd FTP_LOGIN -u pure_ftpd_user -d /ftp_directory #change FTP_LOGIN, pure_ftpd_user and /ftp_directory as you wish

pure-pw useradd javi -u ftp -d /mnt/sdb1/ftp  -> Pide password de usuario a crear   # -u ftp -> Usuario ftp por defecto del sistema

Confirmar cambios:

pure-pw mkdb

mkdir //mnt/sdb1/ftp
chmod -R 777 /mnt*
chown -R nobody:nogroup /mnt*

/etc/init.d/pure-ftpd enable
/etc/init.d/pure-ftpd start

AMULE

opkg install amule

/usr/bin/amuled


SWAP

opkg install kmod-fs-cifs kmod-nls-utf8 kmod-loop losetup

dd if=/dev/zero of=/mnt/share/.swap bs=1M count=64

# rc.local

losetup /dev/loop0 /mnt/share/.swap

mkswap /dev/loop0

swapon /dev/loop0

Y Rebotar


mount -t xfs /dev/sda1 /mnt/share -o rw,sync

/etc/init.d/samba enable
/etc/init.d/samba start


opkg install transmission-web transmission-remote

opkg install kmod-fs-cifs

mount -t cifs //192.168.5.1\\usb1_1 /mnt/routerppal -o unc=\\\\192.168.5.1\\usb1_1,ip=192.168.5.1,user=hola,pass=adios,dom=WORKGROUP

mount -t cifs //192.168.5.2\\javi /mnt/routerppal -o unc=\\\\nizasrv\\javi,ip=192.168.5.2,user=hola,pass=adios,dom=WORKGROUP
mount -t cifs //192.168.5.2\\javi /mnt/routerppal -o unc=\\\\nizasrv\\javi,ip=192.168.5.2,user=hola,pass=adios,dom=WORKGROUP


mount -t cifs //192.168.5.13/public /mnt/nas-ide -o unc=\\\\nas-ide\\public,ip=192.168.5.13,guest,file_mode=0777,dir_mode=0777,nounix,noserverino,sec=none


df -h  -> muestra el sistema de ficheros

opkg install minidlna

Editar fichero de configuracion

/etc/init.d/minidlna enable
/etc/init.d/minidlna start


opkg install kmod-sound-core kmod-usb-audio kmod-sound-cs5535audio mpd-full atftp nano amule mindlna mc smartmontools hdparm


smartctl -a -d usbsunplus /dev/sda (freecom)

smartctl -a -d usbjmicron /dev/sdb  (WD)

smartctl -T permissive -d usbjmicron /dev/sdb


 1.5 HDD spindown
Submitted by back2basic on Mon, 06/14/2010 - 13:55

To let the hdd spindown add this to youre rc.local

# Sleep for a little bit to not interfere with normal system startup
# before we kill a bunch of Asus processes.
sleep 5

# The killing of watchdog is necessary
# to allow the disk to spin down (watchdog is a horribly written hack
# anyway!)
killall -q -9 watchdog

# Do the necessary steps so the internal HDD will spin down
mount -o remount,noatime,nodiratime /shares/${pool}
hdparm -S 180 ${internal_hdd}
smartctl -dT ${internal_hdd}
#smartctl -T permissive -d usbjmicron /dev/sdb # asi deberia ser