Se afișează postările cu eticheta Router Topex Bytton. Afișați toate postările
Se afișează postările cu eticheta Router Topex Bytton. Afișați toate postările


Configurare conexiune RDS OpenWRT(PPPoE)

Configurare  conexiune router pentru RDS OpenWRT(PPPoE)

1.  Se intra in interfata de administrare LuCI

2. Essentials

3.  Network

4.  Protocolul PPPoE ,  username si parola, keep alive, automatic conect.

5.  Save si Apply

Mufa de la rds in wan.



Instalare modem USB 3G orice model

Instalare modem USB 3G orice model.

Tutorialul de mai jos este pentru OpenWrt BackFire 10.03
http://backfire.openwrt.org/10.03/br...4-squashfs.trx
Modemul trebuie sa fie conectat la internet pe interfata de wan.


root@balauru:/#opkg update

root@balauru:/#opkg install kmod-usb-uhci kmod-usb-serial

In acest moment modemul este vazut ca flash stick usb mass storage

root@balauru:/# dmesg|tail
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Enabling device 01:03.1 (0000 -> 0001)
uhci.c: USB UHCI at I/O 0x120, IRQ 2
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
hub.c: new USB device 01:03.0-1, assigned address 2
usb.c: USB device 2 (vend/prod 0x12d1/0x1446) is not claimed by any active driver. <<<<<<<<<<< asta-i
root@balauru:/#

root@balauru:/#opkg install usb-modeswitch

root@balauru:/# cd /etc
root@balauru:/# wget http://www.draisberghof.de/usb_modeswit ... erence.txt
root@balauru:/# mv device_reference.txt usb-modeswitch.conf

Listati cu

root@balauru:/#cat usb-modeswitch.conf
si cautati daca este listat modemul vostru sau cautati vend/prod 0x12d1/0x1446
Editati cu vi

root@balauru:/#vi usb-modeswitch.conf

si stergeti ; din dreptul

; DefaultVendor= 0x12d1
; DefaultProduct= 0x1446

root@balauru:/#vi usb-modeswitch.conf
Trebuie sa stegeti ; dupa cum se vede mai jos
########################################################
# Huawei E1550
# Huawei E1750
#
# Contributor: Anders Blomdell, Ahmed Soliman

DefaultVendor= 0x12d1
DefaultProduct= 0x1446

TargetVendor= 0x12d1
TargetProduct= 0x1001

MessageContent="55534243123456780000000000000011060000000000000000000000000000"

########################################################

In mod USB mass storage are vendor 0x12d1 si product 0x1446
In mod modem 3G are vendor 0x12d1 si product 0x1001
root@balauru:/#reboot

Se verifica daca a schimbat stikul din usb mass storage in modem :

root@balauru:/# usb_modeswitch

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found default devices (1)
Accessing device 002 on bus 002 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached

SCSI inquiry data (for identification)
-------------------------
Vendor String: Orange
Model String: CD ROM (Huawei)
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
Product: HUAWEI Mobile
Serial No.: 0123456789ABCDEF
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
OK, message successfully sent
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.


Configurati usb-modeswitch sa schimbe stickul din mass storage in modem inainte de a initia driverele dupa fiecare reboot astfel :

root@balaurul:~# cat>/etc/init.d/usb-modeswitch
#!/bin/sh /etc/rc.common
#

START=50
start() {

usb_modeswitch

}
^D <<<<<<<<<< apasati CTRL+D
root@balaurul:/etc/rc.d# chmod +x /etc/init.d/usb-modeswitch
root@balaurul:/etc/rc.d# /etc/init.d/usb-modeswitch enable
root@balaurul:/etc/rc.d#reboot

Asociem modemul cu product/vendor :

root@balaurul:~# cat>/etc/modules.d/60-usb-serial
usbserial vendor=0x12d1 product=0x1001 maxSize=4096
^D
root@balaurul:~# reboot

In log ar trebui sa vedem asa ceva :

hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4
hub.c: new USB device 01:02.0-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x12d1/0x1446) is not claimed by any active driver.
device wl0 entered promiscuous mode
wl0: attempt to add interface with same source address.
br-lan: port 2(wl0) entering learning state
br-lan: port 2(wl0) entering forwarding state
br-lan: topology change detected, propagating
usbdevfs: process 642 (usb_modeswitch) did not claim interface 0 before use
usb.c: USB disconnect on device 01:02.0-2 address 2
hub.c: new USB device 01:02.0-2, assigned address 3
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB1 (or usb/tts/1 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB2 (or usb/tts/2 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB3 (or usb/tts/3 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB4 (or usb/tts/4 for devfs)
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB5 (or usb/tts/5 for devfs)
root@balaurul:~#

Instalam comgt
root@balaurul:~# opkg update
root@balaurul:~# opkg install comgt


Din interfata grafica la Network interface wan
Atentie la APN !!! Pentru internet public Orange acesta este ¨internet¨ fara unsername si parola.

Pentru Vodafone:
APN:internet.vodafone.ro
Username:internet.vodafone.ro
Password:internet

http://modmyi.com/wiki/index.php/Car..._.28Romania.29

Configuram wan-ul , de obicei este : /dev/usb/tts/0

Ridicam interfata wan daca avem succes mesajul trebuie sa fie acesta :

root@balaurul:~# ifup wan
Trying to set PIN
PIN set successfully
root@balaurul:~#

Si in acest moment modemul 3g trebuie sa beculeasca continuu.

Se scrie script de initializare interfata wan.

root@balaurul:/etc/rc.d# cat>/etc/init.d/wan
#!/bin/sh /etc/rc.common
# Written by Simon Josefsson 2009-03-05. Released into the public domain.

START=90
start() {
ifup wan
}
^D
root@balaurul:/etc/rc.d# chmod +x /etc/init.d/wan
root@balaurul:/etc/rc.d# /etc/init.d/wan enable
root@balaurul:/etc/rc.d# reboot

SURSA: http://www.elforum.ro/viewtopic.php?f=73&t=59878&start=120


Remote access

Probabil ca majoritatea dintre voi doriti sa va accesati routerul distant de la servici sau aiurea.
Pentru a securiza cu SSL urmati micul tutorial de mai jos:

BusyBox v1.15.3 (2010-04-06 04:14:37 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
Backfire (10.03, r20728) --------------------------
* 1/3 shot Kahlua In a shot glass, layer Kahlua
* 1/3 shot Bailey's on the bottom, then Bailey's,
* 1/3 shot Vodka then Vodka.
---------------------------------------------------
root@balaur:~#
root@balaur:~#
root@balaur:~#
root@balaur:~#
root@balaur:~# opkg update
Downloading http://downloads.openwrt.org/backfire/1 ... ackages.gz.
Inflating http://downloads.openwrt.org/backfire/1 ... ackages.gz.
Updated list of available packages in /var/opkg-lists/packages.

Instalati suportul de ssl pentru OpenWrt

root@balaur:~# opkg install luci-ssl

root@balaur:~# ls /etc/config/
ddns dhcp dropbear firewall luci network system ucitrack uhttpd wireless

Editati fisierul de configurare uhttpd si comentati linia marcata de mine cu rosu.

root@balaur:~# vi /etc/config/uhttpd

# Server configuration
config uhttpd main

# HTTP listen addresses, multiple allowed
# list listen_http 0.0.0.0:80
# list listen_http [::]:80

# HTTPS listen addresses, multiple allowed
list listen_https 0.0.0.0:443
# list listen_https [::]:443

# Server document root
option home /www

...........................

Restartati serverul de http
root@balaur:~# /etc/init.d/uhttpd restart

Acum puteti accesa interfata grafica cu SSL.

SURSA: http://www.elforum.ro/viewtopic.php?f=73&t=59878&start=105

Torrent

Pentru torrent se poate folosi dctcs peste kamikaze.
Instalarea pe router Topex Deluxe (4MB flash) se face in ordinea: mai intai torrent si pe urma suportul de USB file sistem.
Pe Premium (8MB flash) puteti face instalarea in ce ordine vreti voi. Idem pentru cei care boot-eaza de pe USB sau SD/MMC-card.

Router-ul trebuie sa fie conectat la internet.
Comezile sunt:

opkg update

opkg install http://sites.google.com/site/yodctcs/dc ... mipsel.ipk


Dupa cele de mai sus instalati suportul de USB fs.
Cand ati terminat editati fisierul /etc/dctcs.conf

Mai jos aveti dctcs.conf folosit de mine.
Aveti grija sa va creati directorul /mnt/torrent pe hardisk-ul extern:
mkdir /mnt/torrent
si sa dati drepturi de scriere in acel director
chmod 777 -R /mnt/torrent

Mai jos in loc de:
user=utilizator
password=xxxxxxxxxxxx
Puneti user-ul vostru si parola cu care vreti sa va conectati la interfata grafica.

#sample config file

#change these according to your system
torrent-directory=/mnt/torrent/
download-directory=/mnt/torrent/

#change user name and password
user=utilizator
password=xxxxxxxxxxxx

exit-hours=168
exit-ratio=5.6
cache-size=1
restart-torrents=0

download-limit=0
upload-limit=0

check-interval=0

port=18000

#arbitrary arguments to ctorrent
ctorrent-args=-a
#run command after download complete see ctorrent -X for details
ctorrent-complete=command

#url to prepend in the details box
detail-url=ftp://192.168.1.1/mnt/torrent/

#arbitrary arguments to wget
wget-args=-c

#write-stats=1
ctorrent=/usr/bin/ctorrent
client-host=localhost:15000
htmlroot-directory=/usr/share/dctcs/www/darkside.ctcs.gui/
wget=/usr/bin/wget


Acum trebuie sa porniti serviciul de dctcs
root@OpenWrt:~# /etc/init.d/dctcs enable
root@OpenWrt:~# /etc/init.d/dctcs start


In acest moment puteti accesa interfata grafica la
http://adresaIProuter:18000

SURSA:  http://www.elforum.ro/viewtopic.php?f=73&t=59878&start=90

OVERCLOCKING

OVERCLOCKING

din CLI

nvram set clkfreq=264,132
nvram commit
reboot & exit

SURSA: http://www.elforum.ro/viewtopic.php?f=73&t=59878&start=0

Suport de HDD, SAMBA si sftp

Aveti un router cu OpenWrt si vreti sa-i adaugati suport de HDD, SAMBA si sftp pentru a accesa acest HDD si de la servici, sau pur si simplu sa faceti share securizat de fisiere peste internet.
Exemplul de mai jos este pentru un HDD extern FAT.
Intrati cu telnet pe router si schimbati parola.

root@OpenWrt:~# passwd
Changing password for root
New password:
Bad password: too weak
Retype password:
Password for root changed by root

Va reconectati cu SSH. Putty


root@OpenWrt:/# opkg update
Downloading http://downloads.openwrt.org/kamikaz...es/Packages.gz
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
Packages.gz 100% |*************************************************************************************************** ******| 130k --:--:-- ETA
Inflating http://downloads.openwrt.org/kamikaz...es/Packages.gz
Updated list of available packages in /var/opkg-lists/snapshots

Dezinstalati varianta minima de administrare pentru a face loc pe flash.

root@OpenWrt:/# opkg remove luci-admin-mini
Removing package luci-admin-mini from root...

Instalati SAMBA

root@OpenWrt:/# opkg install luci-app-samba
Installing luci-app-samba (0.8.8-1) to root...
Downloading http://downloads.openwrt.org/kamikaz...8-1_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
luci-app-samba_0.8.8 100% |*************************************************************************************************** ******| 2866 --:--:-- ETA
Installing samba3 (3.0.24-2) to root...
Downloading http://downloads.openwrt.org/kamikaz...4-2_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.8.39.5:8080)
samba3_3.0.24-2_mips 100% |*************************************************************************************************** ******| 456k 00:00:00 ETA
Installing libpthread (0.9.29-14.3) to root...
Downloading http://downloads.openwrt.org/kamikaz...4.3_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
libpthread_0.9.29-14 100% |*************************************************************************************************** ******| 19340 --:--:-- ETA
Configuring libpthread
Configuring luci-app-samba
Configuring samba3


Adaugati suportul de usb2 si firewall&port forwarding


root@OpenWrt:/# opkg install luci-app-firewall kmod-fs-vfat kmod-usb-storage kmod-usb-uhci-iv kmod-usb2
Installing luci-app-firewall (0.8.8-1) to root...
Downloading http://downloads.openwrt.org/kamikaz...8-1_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
luci-app-firewall_0. 100% |*************************************************************************************************** ******| 7679 --:--:-- ETA
Installing kmod-fs-vfat (2.4.35.4-brcm-2.4-1) to root...
Downloading http://downloads.openwrt.org/kamikaz...4-1_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
kmod-fs-vfat_2.4.35. 100% |*************************************************************************************************** ******| 32643 --:--:-- ETA
Installing kmod-usb-storage (2.4.35.4-brcm-2.4-1) to root...
Downloading http://downloads.openwrt.org/kamikaz...4-1_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
kmod-usb-storage_2.4 100% |*************************************************************************************************** ******| 41024 --:--:-- ETA
Installing kmod-usb-core (2.4.35.4-brcm-2.4-1) to root...
Downloading http://downloads.openwrt.org/kamikaz...4-1_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
kmod-usb-core_2.4.35 100% |*************************************************************************************************** ******| 46534 --:--:-- ETA
Installing kmod-scsi-core (2.4.35.4-brcm-2.4-1) to root...
Downloading http://downloads.openwrt.org/kamikaz...4-1_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
kmod-scsi-core_2.4.3 100% |*************************************************************************************************** ******| 54968 --:--:-- ETA
Installing kmod-usb-uhci-iv (2.4.35.4-brcm-2.4-1) to root...
Downloading http://downloads.openwrt.org/kamikaz...4-1_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
kmod-usb-uhci-iv_2.4 100% |*************************************************************************************************** ******| 19399 --:--:-- ETA
Installing kmod-usb2 (2.4.35.4-brcm-2.4-1) to root...
Downloading http://downloads.openwrt.org/kamikaz...4-1_mipsel.ipk
Connecting to 10.1.1.1:8080 (10.1.1.1:8080)
kmod-usb2_2.4.35.4-b 100% |*************************************************************************************************** ******| 15708 --:--:-- ETA
Configuring kmod-fs-vfat
Configuring kmod-scsi-core
Configuring kmod-usb-core
Configuring kmod-usb-storage
Configuring kmod-usb-uhci-iv
Configuring kmod-usb2
Configuring luci-app-firewall


In acest moment daca conectati un HDD usb la router acesta va fi detectat


root@OpenWrt:/# dmesg
............................................

Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
hub.c: new USB device 01:02.2-1, assigned address 2
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: Model: Flash Disk Rev: 5.00
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 2068992 512-byte hdwr sectors (1059 MB)
sda: Write Protect is off
Partition check:
/dev/scsi/host0/bus0/target0/lun0: p1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2


Creati un script shell pentru a monta HDD-ul in directorul ¨share¨ la fiecare restart la router-ului.


root@OpenWrt:/# cat>/etc/init.d/usbhdd
#!/bin/sh /etc/rc.common
START=99
STOP=40
start()
{
echo -n "Mounting USB drive: "
mount -t vfat -o uid=65534,gid=65534,dmask=0,fmask=0 /dev/scsi/host0/bus0/target0/lun0/part1 /share
echo "Done."
}
stop()
{
echo -n "Umounting USB drive: "
sync
sync
umount /dev/scsi/host0/bus0/target0/lun0/part1
echo "Done."
}
restart()
{
stop
start
}

Apasati Ctrl+D pentru a finaliza editarea si verificati

root@OpenWrt:/# cat /etc/init.d/usbhdd
#!/bin/sh /etc/rc.common
START=99
STOP=40
start()
{
echo -n "Mounting USB drive: "
mount -t vfat -o uid=65534,gid=65534,dmask=0,fmask=0 /dev/scsi/host0/bus0/target0/lun0/part1 /share
echo "Done."
}
stop()
{
echo -n "Umounting USB drive: "
sync
sync
umount /dev/scsi/host0/bus0/target0/lun0/part1
echo "Done."
}
restart()
{
stop
start
}


Modificati fisierul usbhdd in executabil


root@OpenWrt:/# chmod +x /etc/init.d/usbhdd

Activati autostart pentru usbhdd

root@OpenWrt:/# /etc/init.d/usbhdd enable

Creati directorul ¨share¨

root@OpenWrt:/# cd /
root@OpenWrt:/# mkdir share


Listati

root@OpenWrt:/# ls
bin dev etc home jffs lib mnt proc rom root sbin share sys tmp usr var www
root@OpenWrt:/# pwd
/


Rulati scriptul de initializare usbhdd

root@OpenWrt:/# /etc/init.d/usbhdd start
Mounting USB drive: Done.


Verificati daca HDD-ul a fost vazut si montat


root@OpenWrt:/# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.6M 1.6M 0 100% /
/dev/root 1.6M 1.6M 0 100% /rom
tmpfs 14.9M 384.0k 14.5M 3% /tmp
/dev/mtdblock/4 1.7M 1.2M 544.0k 69% /jffs
mini_fo:/jffs 1.6M 1.6M 0 100% /
/dev/scsi/host0/bus0/target0/lun0/part1 1008.2M 857.7M 150.6M 85% /share


Verificati si listati continutul directorului montat.


root@OpenWrt:/# ls /share
3cdaemon consola.ppk pcra023-confg tftpboot7970.sccp.7-0-2
IMG_1114.jpg consola_lucian.ppk tftpboot tftpboot7970.sccp.8-2-2sp1
Quasar cp005058.scexe tftpboot 7905 tftpboot7970.sip.8-3-1
SEP000E84E8E3D5.cnf.xml dialplan.xml tftpboot 7970 work
XMLDefault.cnf.xml firmware telefoane cisco 79xx tftpboot2-7940-7960 wrt firmware
asterisk firmware telefoane linksys SPA9xx tftpboot7970.SIP70.8-5-2S tftpboot7970.sccp.6-0-3
root@OpenWrt:/#


Activati autostart si porniti serviciul de SAMBA


root@OpenWrt:/etc/samba# /etc/init.d/samba enable
root@OpenWrt:/etc/samba# /etc/init.d/samba start


Editati fisierul template de configurare SAMBA dupa cum urmeaza.

Pe scurt, comenzile necesare pentru editorul VI sunt:
i - pentru insert si a incepe editarea
esc - pentru a iesi din editare
Shift+zz - pentru a salva
:q! - pentru a iesi din editare fara a salva

root@OpenWrt:vi /etc/samba/smb.conf.template
[global]
netbios name = openwrt
workgroup = openwrt
server string = openwrt
name resolve order = lmhosts hosts bcast
syslog = 10
encrypt passwords = true
passdb backend = smbpasswd
obey pam restrictions = yes
socket options = TCP_NODELAY
unix charset = ISO-8859-1
preferred master = yes
os level = 20
security = share
guest account = nobody
invalid users = root
smb passwd file = /etc/samba/smbpasswd
writeable = yes
public = yes
root@OpenWrt:~#


Restartati serviciul de SAMBA



root@OpenWrt:/etc/samba# /etc/init.d/samba restart

Ultimul pas este sa configurati router-ul din interfata grafica asa cum se vede in atasamente.


In acest moment din orice calculator conectat pe lan-ul router-ului se poate accesa fisierul share la \\192.168.1.1

In atasament aveti cum se configureaza interfata grafica pentru port forwarding si network file share.

Pentru a accesa fisierele cu sftp pe portul 443 trebuie sa instalati serviciul de sftpd, altfel merge cu un client de scp (winscp, pscp).

root@OpenWrt:/etc/samba# opkg install openssh-sftp-server

Asigurati-va ca accesul catre router-ul dvs este deschis pe portul 443 - verificati setarea Firewall a router-ului (Network -> Firewall).
Iar in acest moment puteti sa va accesati hdd-ul de acasa de oriunde aveti o conexiune la internet. Nu uitati sa configurati winscp cu sesiune catre IP wan router port 443. Portul 443 (ssl) este in general deschis pentru toate retelele corporate sau nu, deci nu veti avea probleme de firewall.

SURSA: http://www.elforum.ro/viewtopic.php?f=73&t=59878&start=0

Resoftare Router

Procedura de resoftare router Topex Bytton cu placa de baza Asus wl500 Deluxe sau Premium

Ca sa resoftati router-ul trebuie sa parcurgeti urmatorii pasi:

- descarcati firmware-ul de aici http://backfire.openwrt.org/
- setati adresa statica pe calculator 192.168.1.2
- porniti router cu butonul de reset apasat pana incepe sa palpaie led-ul de power
- conectati calculatorul la router pe un port de LAN1 2 3 sau 4
- dintr-o fereastra dos tastati "ping 192.168.1.1" , daca nu raspunde verificati setarile lan ale calculatorului si/sau cablul ethernet - trebuie da fie 1 la 1
- din fereastra dos tastati "tftp -i 192.168.1.1 put openwrt-brcm-2.4-squashfs.trx" (comanda se da fara ghilimele si trebuie sa fiti in directorul in care ati descarcat firmware-ul)

Transferul dureaza cateva secunde timp in care led-ul de LAN palpaie. Lasati router-ul 2minute pentru a se face scrierea din ram in flash, dupa care resetati.

SURSA: http://www.elforum.ro/viewtopic.php?f=73&t=59878&start=0