OpenWRT

Docs importantes

Réseau

  • Comprendre le fonctionnement et la configuration des VLAN
  • Voir si la configuration du réseau de la maison est possible:
    • Machine en DMZ avec VM utilisant des VLAN taggués pour se retrouver dans le bon réseau
    • Redirection en tout genre (Squid, SquidGuard, Bittorent, QoS) pour faire un AP public

/etc/config/network:

config 'switch' 'eth0'
        option 'vlan0' '0 1 2 3 5*'
        option 'vlan1' '4 5'

config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'

config 'interface' 'lan'
        option 'type' 'bridge'
        option 'ifname' 'eth0.0'
        option 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'ipaddr' '192.168.0.2'

config 'interface' 'wan'
        option 'ifname' 'eth0.1'
        option 'proto' 'dhcp'

/etc/config/firewall:

config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT

config zone
        option name             lan
        option input    ACCEPT
        option output   ACCEPT
        option forward  REJECT

config zone
        option name             wan
        option input    REJECT
        option output   ACCEPT
        option forward  REJECT
        option masq             1

config forwarding
        option src      lan
        option dest     wan

Interfaces:

# ifconfig -a
br-lan    Link encap:Ethernet  HWaddr 00:21:29:B5:D7:6D
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:403677 errors:0 dropped:0 overruns:0 frame:0
          TX packets:517281 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:47834661 (45.6 MiB)  TX bytes:659379999 (628.8 MiB)

eth0      Link encap:Ethernet  HWaddr 00:21:29:B5:D7:6D
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:925435 errors:0 dropped:0 overruns:0 frame:0
          TX packets:918958 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:717651833 (684.4 MiB)  TX bytes:719172944 (685.8 MiB)
          Interrupt:4

eth0.0    Link encap:Ethernet  HWaddr 00:21:29:B5:D7:6D
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:404231 errors:0 dropped:0 overruns:0 frame:0
          TX packets:517340 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:49491778 (47.1 MiB)  TX bytes:661147896 (630.5 MiB)

eth0.1    Link encap:Ethernet  HWaddr 00:21:29:B5:D7:6D
          inet addr:88.186.16.24  Bcast:88.186.16.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:521209 errors:0 dropped:0 overruns:0 frame:0
          TX packets:401138 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:651502601 (621.3 MiB)  TX bytes:54119672 (51.6 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:27 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2243 (2.1 KiB)  TX bytes:2243 (2.1 KiB)

wl0       Link encap:Ethernet  HWaddr 00:21:29:B5:D7:6F
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:260 errors:3 dropped:0 overruns:0 frame:2581568
          TX packets:3519 errors:4 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:23206 (22.6 KiB)  TX bytes:766688 (748.7 KiB)
          Interrupt:2 Base address:0x5000

IPv6 Freebox sur le LAN

  • Installer de quoi avoir de l'IPv6: kmod-ipv6, ip, radvd
  • Vérifier qu'on peut pinger un host en IPv6: ping6 www.kame.net
  • Trouver le subnet IPv6 de la Freebox (trouver la terminologie: subnet/IPv6 ??)
  • Configurer radvd
  • Configurer les clients sur le LAN