visto che di documentazione su niit non ne esiste, e contattando l'autore sembra che di fare la documentazione gli piacerebbe ma non lo fa, allora ho flashato il firmware che ho trovato nel suo sito per cercare di capire cosa fa, da quello che ho avuto modo di vedere adesso c'e' un device niit0 che non ha nessuna configurazione e che viene solo indicato nelle rotte relative agli address mappati<br>
pero' compilando niit da repository e mettendolo dentro un firmware nuovo si trovano due device uno per niit4to6 e l'altro niit6to4 spero che basti cambiare le rotte vi attacco un po di roba alla mail:<br><br><b>root@OpenWrt:/etc/config# ip addr show</b><br>
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN <br> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br> inet <a href="http://127.0.0.1/8">127.0.0.1/8</a> brd 127.255.255.255 scope host lo<br>
inet6 ::1/128 scope host <br> valid_lft forever preferred_lft forever<br>2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000<br> link/ether 00:15:6d:d5:f7:d1 brd ff:ff:ff:ff:ff:ff<br>
inet6 fe80::215:6dff:fed5:f7d1/64 scope link <br> valid_lft forever preferred_lft forever<br>4: ip6tnl0: <NOARP> mtu 1460 qdisc noop state DOWN <br> link/tunnel6 :: brd ::<br>5: tunl0: <NOARP> mtu 1480 qdisc noop state DOWN <br>
link/ipip 0.0.0.0 brd 0.0.0.0<br>6: wifi0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 195<br> link/ieee802.11 00:15:6d:d4:f7:d1 brd ff:ff:ff:ff:ff:ff<br>7: niit0: <NOARP,UP,LOWER_UP> mtu 1460 qdisc pfifo_fast state UNKNOWN qlen 1000<br>
link/ipip c2:d5:63:11:72:26 brd ff:ff:ff:ff:ff:ff<br>8: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1240 qdisc noqueue state UNKNOWN <br> link/ether 00:15:6d:d5:f7:d1 brd ff:ff:ff:ff:ff:ff<br> inet <a href="http://10.36.0.1/29">10.36.0.1/29</a> brd 10.36.0.7 scope global br-lan<br>
9: ath0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 qdisc noqueue state UNKNOWN <br> link/ether 00:15:6d:d4:f7:d1 brd ff:ff:ff:ff:ff:ff<br> inet6 fdca:ffee:babe:dada:215:6dff:fed5:f7d1/64 scope global <br> valid_lft forever preferred_lft forever<br>
inet6 fe80::215:6dff:fed4:f7d1/64 scope link <br> valid_lft forever preferred_lft forever<br><b>root@OpenWrt:/etc/config# ip route show</b><br><a href="http://10.36.0.0/29">10.36.0.0/29</a> dev br-lan proto kernel scope link src 10.36.0.1 <br>
<b>root@OpenWrt:/etc/config# ip -6 route show</b><br>::ffff:<a href="http://10.36.0.0/125">10.36.0.0/125</a> dev niit0 metric 1 mtu 1460 advmss 1400 hoplimit 4294967295<br>::ffff:<a href="http://192.168.1.0/125">192.168.1.0/125</a> dev niit0 metric 1 mtu 1460 advmss 1400 hoplimit 4294967295<br>
fdca:ffee:babe:dada::/64 dev ath0 metric 256 mtu 1400 advmss 1340 hoplimit 4294967295<br>fe80::/64 dev eth0 metric 256 mtu 1500 advmss 1440 hoplimit 4294967295<br>fe80::/64 dev ath0 metric 256 mtu 1400 advmss 1340 hoplimit 4294967295<br>
<br><br><b>root@OpenWrt:/etc/config# cat network </b><br># Copyright (C) 2006 OpenWrt.org<br><br>config interface loopback<br> option ifname lo<br> option proto static<br> option ipaddr 127.0.0.1<br>
option netmask 255.0.0.0<br><br>config interface lan<br> option ifname eth0<br> option type bridge<br> option proto static<br> option ipaddr 192.168.1.1<br> option netmask 255.255.255.0<br>
<b>root@OpenWrt:/etc/config# cat niit </b><br>config niit ipv4<br> option pool "<a href="http://10.36.0.0/16">10.36.0.0/16</a>"<br> option netsize "29"<br>
<br>config niit ipv6<br> option ula_prefix "fd00::"<br> option ula_global "00ca:ffee:babe::"<br> option ula_subnet "0000:0000:0000:dada::"<br>
option niit_prefix "::ffff:0000:0000"<br><br>config niit wifi<br> option essid "<a href="http://olsr.freifunk.net">olsr.freifunk.net</a>"<br> option bssid "02:ca:ff:ee:ba:be"<br>
option channel "10"<br><b>root@OpenWrt:/etc/config# cat wireless </b><br>config wifi-device wifi0<br> option type atheros<br> option channel auto<br><br> # REMOVE THIS LINE TO ENABLE WIFI:<br>
option disabled 1<br><br>config wifi-iface<br> option device wifi0<br> option network lan<br> option mode ap<br> option ssid OpenWrt<br> option encryption none<br><b>root@OpenWrt:/etc/config# cat firewall </b><br>
config defaults<br> option syn_flood 1<br> option input ACCEPT<br> option output ACCEPT <br> option forward REJECT<br><br>config zone<br> option name lan<br>
option input ACCEPT <br> option output ACCEPT <br> option forward REJECT<br><br>config zone<br> option name wan<br> option input REJECT<br> option output ACCEPT <br>
option forward REJECT<br> option masq 1 <br> option mtu_fix 1<br><br>config forwarding <br> option src lan<br> option dest wan<br><br># We need to accept udp packets on port 68,<br>
# see <a href="https://dev.openwrt.org/ticket/4108">https://dev.openwrt.org/ticket/4108</a><br>config rule<br> option src wan<br> option proto udp<br> option dest_port 68<br>
option target ACCEPT<br><br># include a file with users custom iptables rules<br>config include<br> option path /etc/firewall.user<br><br><br>### EXAMPLE CONFIG SECTIONS<br># do not allow a specific ip to access wan<br>
#config rule<br># option src lan<br># option src_ip 192.168.45.2<br># option dest wan<br># option proto tcp<br># option target REJECT <br><br># block a specific mac on wan<br>
#config rule<br># option dest wan<br># option src_mac 00:11:22:33:44:66<br># option target REJECT <br><br># block incoming ICMP traffic on a zone<br>#config rule<br># option src lan<br>
# option proto ICMP<br># option target DROP<br><br># port redirect port coming in on wan to lan<br>#config redirect<br># option src wan<br># option src_dport 80<br>
# option dest lan<br># option dest_ip 192.168.16.235<br># option dest_port 80 <br># option proto tcp<br><br><br>### FULL CONFIG SECTIONS<br>#config rule<br>
# option src lan<br># option src_ip 192.168.45.2<br># option src_mac 00:11:22:33:44:55<br># option src_port 80<br># option dest wan<br># option dest_ip 194.25.2.129<br>
# option dest_port 120<br># option proto tcp<br># option target REJECT <br><br>#config redirect<br># option src lan<br># option src_ip 192.168.45.2<br># option src_mac 00:11:22:33:44:55<br>
# option src_port 1024<br># option src_dport 80<br># option dest_ip 194.25.2.129<br># option dest_port 120<br># option proto tcp<br><br><br>Questo e' quello che ci si trova dopo aver eseguito il niit-wizard sul firmware trovato sul sito di alx, pero' guardando velocemente questi settaggi non capisco come dovrebbe fare a funzionare...<br>
<br><br>