Diferencia entre revisiones de «Openwrt»
Línea 26: | Línea 26: | ||
config 'interface' 'loopback' | config 'interface' 'loopback' | ||
− | + | ||
− | + | option 'ifname' 'lo' | |
− | + | ||
− | + | option 'proto' 'static' | |
+ | |||
+ | option 'ipaddr' '127.0.0.1' | ||
+ | |||
+ | option 'netmask' '255.0.0.0' | ||
config 'interface' 'wan' | config 'interface' 'wan' | ||
− | + | ||
− | + | option 'ifname' 'eth0.1' | |
− | + | ||
− | + | option 'proto' 'static' | |
− | + | ||
− | option 'peerdns' '0' | + | option 'ipaddr' '164.73.234.126' |
− | option 'gateway' '164.73.234.1' | + | |
− | + | option 'netmask' '255.255.255.128' | |
+ | |||
+ | option 'defaultroute' '0' | ||
+ | |||
+ | option 'peerdns' '0' | ||
+ | |||
+ | option 'gateway' '164.73.234.1' | ||
+ | |||
+ | option 'dns' '164.73.128.5 164.73.128.70' | ||
config 'switch' | config 'switch' | ||
− | + | ||
− | option 'reset' '1' | + | option 'name' 'rtl8366rb' |
− | option 'enable_vlan' '1' | + | |
+ | option 'reset' '1' | ||
+ | |||
+ | option 'enable_vlan' '1' | ||
config 'switch_vlan' | config 'switch_vlan' | ||
− | option 'device' 'rtl8366rb' | + | |
− | option 'vlan' '1' | + | option 'device' 'rtl8366rb' |
− | option 'ports' '0 5t' | + | |
+ | option 'vlan' '1' | ||
+ | |||
+ | option 'ports' '0 5t' | ||
config 'switch_vlan' | config 'switch_vlan' | ||
− | option 'device' 'rtl8366rb' | + | |
− | option 'vlan' '2' | + | option 'device' 'rtl8366rb' |
− | option 'ports' '1 5t' | + | |
+ | option 'vlan' '2' | ||
+ | |||
+ | option 'ports' '1 5t' | ||
config 'switch_vlan' | config 'switch_vlan' | ||
− | option 'device' 'rtl8366rb' | + | |
− | option 'vlan' '3' | + | option 'device' 'rtl8366rb' |
− | option 'ports' '2 5t' | + | |
+ | option 'vlan' '3' | ||
+ | |||
+ | option 'ports' '2 5t' | ||
config 'switch_vlan' | config 'switch_vlan' | ||
− | option 'device' 'rtl8366rb' | + | |
− | option 'vlan' '4' | + | option 'device' 'rtl8366rb' |
− | option 'ports' '3 5t' | + | |
+ | option 'vlan' '4' | ||
+ | |||
+ | option 'ports' '3 5t' | ||
config 'switch_vlan' | config 'switch_vlan' | ||
− | option 'device' 'rtl8366rb' | + | |
− | option 'vlan' '5' | + | option 'device' 'rtl8366rb' |
− | option 'ports' '4 5t' | + | |
+ | option 'vlan' '5' | ||
+ | |||
+ | option 'ports' '4 5t' | ||
config 'interface' 'dmz' | config 'interface' 'dmz' | ||
− | option 'proto' 'static' | + | |
− | option 'ifname' 'eth0.2' | + | option 'proto' 'static' |
− | option 'ipaddr' '10.5.2.1' | + | |
− | option 'netmask' '255.255.255.0' | + | option 'ifname' 'eth0.2' |
− | option 'defaultroute' '0' | + | |
− | option 'peerdns' '0' | + | option 'ipaddr' '10.5.2.1' |
+ | |||
+ | option 'netmask' '255.255.255.0' | ||
+ | |||
+ | option 'defaultroute' '0' | ||
+ | |||
+ | option 'peerdns' '0' | ||
config 'interface' 'lan1' | config 'interface' 'lan1' | ||
− | + | ||
− | option 'ifname' 'eth0.3' | + | option 'proto' 'static' |
− | option 'ipaddr' '10.5.1.1' | + | |
− | option 'netmask' '255.255.255.0' | + | option 'ifname' 'eth0.3' |
− | option 'defaultroute' '0' | + | |
− | option 'peerdns' '0' | + | option 'ipaddr' '10.5.1.1' |
+ | |||
+ | option 'netmask' '255.255.255.0' | ||
+ | |||
+ | option 'defaultroute' '0' | ||
+ | |||
+ | option 'peerdns' '0' | ||
config 'interface' 'lan2' | config 'interface' 'lan2' | ||
− | option 'proto' 'static' | + | |
− | option 'ifname' 'eth0.4' | + | option 'proto' 'static' |
− | option 'netmask' '255.255.255.0' | + | |
− | option 'defaultroute' '0' | + | option 'ifname' 'eth0.4' |
− | option 'peerdns' '0' | + | |
− | option 'ipaddr' '10.5.4.1' | + | option 'netmask' '255.255.255.0' |
+ | |||
+ | option 'defaultroute' '0' | ||
+ | |||
+ | option 'peerdns' '0' | ||
+ | |||
+ | option 'ipaddr' '10.5.4.1' | ||
config 'interface' 'lan3' | config 'interface' 'lan3' | ||
− | option 'proto' 'static' | + | |
− | option 'ifname' 'eth0.5' | + | option 'proto' 'static' |
− | option 'netmask' '255.255.255.0' | + | |
− | option 'defaultroute' '0' | + | option 'ifname' 'eth0.5' |
− | option 'peerdns' '0' | + | |
− | option 'ipaddr' '10.5.5.1' | + | option 'netmask' '255.255.255.0' |
+ | |||
+ | option 'defaultroute' '0' | ||
+ | |||
+ | option 'peerdns' '0' | ||
+ | |||
+ | option 'ipaddr' '10.5.5.1' | ||
config 'alias' 'legacy' | config 'alias' 'legacy' | ||
− | option 'proto' 'static' | + | |
− | option 'interface' 'lan1' | + | option 'proto' 'static' |
− | option 'ipaddr' '10.5.1.252' | + | |
− | option 'netmask' '255.255.255.0' | + | option 'interface' 'lan1' |
+ | |||
+ | option 'ipaddr' '10.5.1.252' | ||
+ | |||
+ | option 'netmask' '255.255.255.0' | ||
config 'interface' 'wlan' | config 'interface' 'wlan' | ||
− | option 'proto' 'static' | + | |
− | option 'ipaddr' '10.5.3.1' | + | option 'proto' 'static' |
− | option 'netmask' '255.255.255.0' | + | |
− | + | option 'ipaddr' '10.5.3.1' | |
− | option 'peerdns' '0' | + | |
− | option 'ifname' 'wlan0' | + | option 'netmask' '255.255.255.0' |
+ | |||
+ | option 'defaultroute' '0' | ||
+ | |||
+ | option 'peerdns' '0' | ||
+ | |||
+ | option 'ifname' 'wlan0' | ||
Para trabajar más facil, paramos y deshabilitamos el firewall, para después de configurado volver a habilitarlo. Lo hacemos mediante los comandos: | Para trabajar más facil, paramos y deshabilitamos el firewall, para después de configurado volver a habilitarlo. Lo hacemos mediante los comandos: |
Revisión del 15:05 20 jun 2011
Instalación de OPENWRT
Usamos la distribución OPENWRT 10.03.1. Se puede descargar desde el sitio de [1]
De esta manera obtenemos mucha mas funcionalidad y versatilidad.
Mediante la interfaz web, que viene con defecto con el router, en la opción de "Firmware Upgrade" tenemos la opción de actualizar su firmware por OPENWRT.
Luego de cargada el firmware de OPENWRT, reiniciamos el router.
Con el nuevo firmware cargado, desde una consola entramos por telnet para darle una contraseña al usuario root (único usuario del firmware):
$ telnet 192.168.1.1 $ passwd $ exit
Por consola no volvemos a logear pero por ssh:
$ ssh root@192.168.1.1
Ahora tenemos que editar la configuración de red por defecto, esto lo hacemos editando:
/etc/config/network
y lo dejamos de la siguiente forma:
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config 'interface' 'wan'
option 'ifname' 'eth0.1'
option 'proto' 'static'
option 'ipaddr' '164.73.234.126'
option 'netmask' '255.255.255.128'
option 'defaultroute' '0'
option 'peerdns' '0'
option 'gateway' '164.73.234.1'
option 'dns' '164.73.128.5 164.73.128.70'
config 'switch'
option 'name' 'rtl8366rb'
option 'reset' '1'
option 'enable_vlan' '1'
config 'switch_vlan'
option 'device' 'rtl8366rb'
option 'vlan' '1'
option 'ports' '0 5t'
config 'switch_vlan'
option 'device' 'rtl8366rb'
option 'vlan' '2'
option 'ports' '1 5t'
config 'switch_vlan'
option 'device' 'rtl8366rb'
option 'vlan' '3'
option 'ports' '2 5t'
config 'switch_vlan'
option 'device' 'rtl8366rb'
option 'vlan' '4'
option 'ports' '3 5t'
config 'switch_vlan'
option 'device' 'rtl8366rb'
option 'vlan' '5'
option 'ports' '4 5t'
config 'interface' 'dmz'
option 'proto' 'static'
option 'ifname' 'eth0.2'
option 'ipaddr' '10.5.2.1'
option 'netmask' '255.255.255.0'
option 'defaultroute' '0'
option 'peerdns' '0'
config 'interface' 'lan1'
option 'proto' 'static'
option 'ifname' 'eth0.3'
option 'ipaddr' '10.5.1.1'
option 'netmask' '255.255.255.0'
option 'defaultroute' '0'
option 'peerdns' '0'
config 'interface' 'lan2'
option 'proto' 'static'
option 'ifname' 'eth0.4'
option 'netmask' '255.255.255.0'
option 'defaultroute' '0'
option 'peerdns' '0'
option 'ipaddr' '10.5.4.1'
config 'interface' 'lan3'
option 'proto' 'static'
option 'ifname' 'eth0.5'
option 'netmask' '255.255.255.0'
option 'defaultroute' '0'
option 'peerdns' '0'
option 'ipaddr' '10.5.5.1'
config 'alias' 'legacy'
option 'proto' 'static'
option 'interface' 'lan1'
option 'ipaddr' '10.5.1.252'
option 'netmask' '255.255.255.0'
config 'interface' 'wlan'
option 'proto' 'static'
option 'ipaddr' '10.5.3.1'
option 'netmask' '255.255.255.0'
option 'defaultroute' '0'
option 'peerdns' '0'
option 'ifname' 'wlan0'
Para trabajar más facil, paramos y deshabilitamos el firewall, para después de configurado volver a habilitarlo. Lo hacemos mediante los comandos:
$ /etc/init.d/firewall disable $ /etc/init.d/firewall stop
Para chequear que quedó deshabilitado:
$ iptables –L