FAQ:OpenWRT: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| m (Marc moved page FAQ:LEDE to FAQ:OpenWRT: LEDE and OpenWRT have merged back) |  (Add the way to use the LTE stick for connectivity backup) | ||
| Line 59: | Line 59: | ||
| </source> | </source> | ||
| cf https://lede-project.org/docs/user-guide/opkg | cf https://lede-project.org/docs/user-guide/opkg | ||
| = Use a Huawei USB LTE HiLink Modem as 4G Backup on my OpenWRT Router = | |||
| {{Notice|1=These commands came from https://lecrabeinfo.net/installer-firmware-openwrt-sur-routeur-wi-fi.html#un-modem-lte-4g}} | |||
| * Install usb-modeswitch and kmod-usb-net-rndis to switch the LTE stick from USB storage to USB LTE Modem | |||
| <source lang="bash"> | |||
| opkg update | |||
| opkg install kmod-usb-net-rndis usb-modeswitch | |||
| </source> | |||
| * Verify the mode did switch, otherwise insert back the key or reboot | |||
| <source lang="bash"> | |||
| root@LEDE:~# lsusb | grep LTE | |||
| Bus 002 Device 003: ID 12d1:14dc Huawei Technologies Co., Ltd. E33372 LTE/UMTS/GSM HiLink Modem/Networkcard | |||
| </source> | |||
| * Verify that you have a new network interface (eth2 in my case) | |||
| <source lang="bash"> | |||
| root@LEDE:~# dmesg | grep cdc_ether | |||
| [   16.075790] usbcore: registered new interface driver cdc_ether | |||
| [   19.232911] cdc_ether 2-1:1.0 eth2: register 'cdc_ether' at usb-f10f8000.usb3-1, CDC Ethernet Device, 0c:5b:8f:xx:xx:xx | |||
| </source> | |||
| * Setup a new wwan interface with eth2 + DHCP mode | |||
| <source lang="bash"> | |||
| uci set network.wwan=interface | |||
| uci set network.wwan.ifname='eth2' | |||
| uci set network.wwan.proto='dhcp' | |||
| uci commit | |||
| </source> | |||
| * Enable firewall on wwan | |||
| <source lang="bash"> | |||
| uci add_list firewall.@zone[1].network='wwan' | |||
| uci commit | |||
| </source> | |||
| * Restart Firewall and Network | |||
| <source lang="bash"> | |||
| /etc/init.d/firewall reload | |||
| /etc/init.d/network restart | |||
| </source> | |||
Revision as of 13:44, 15 September 2018
Perso
Install basic packages
opkg update
opkg install diffutils lsof usbutils
opkg install snmpd
opkg install mount-utils block-mount kmod-usb-storage kmod-fs-ext4 kmod-fs-vfat kmod-fs-exfat kmod-fs-ntfs kmod-fs-hfs kmod-fs-hfsplus kmod-nls-cp437 kmod-nls-iso8859-1
opkg install luci-app-samba
opkg install luci-app-ddns ddns-scripts_no-ip_com
opkg install dnsmasq-full
# Go in http://10.146.199.1/cgi-bin/luci/admin/network/dhcp Advanced Settings and enable both DNSSEC option
DDNS
Install ddns-scripts_nsupdate
- On the server that will generate Klede.+157+55429.key and Klede.+157+55429.private files
dnssec-keygen -a HMAC-md5 -b 512 -n USER lede
- In the /etc/bind9/named.conf.local, update section like this one
key lede {
        algorithm HMAC-MD5;
        secret "ADDTHEKEYFROM_LEDE_PRIVATE_FILE";
};
zone "leurent.eu" {
        type master;
        notify yes;
        file "/etc/bind/leurent/leurent.eu.db";
        update-policy { grant lede name lede.leurent.eu A; };
        ...
};
- On LEDE box, you can install ddns-scripts_nsupdate and have a look at /usr/lib/ddns/update_nsupdate.sh to see how it works
opkg install ddns-scripts_nsupdate
- Now you can go in the DDNS section
- Use the bind-nsupdate client
- For the login use the name of the key you created on the server "lede" here
- For the password, use the key
 
System Commands
Upgrade all packages
opkg update
opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade
cf https://lede-project.org/docs/user-guide/opkg
Use a Huawei USB LTE HiLink Modem as 4G Backup on my OpenWRT Router
|  | These commands came from https://lecrabeinfo.net/installer-firmware-openwrt-sur-routeur-wi-fi.html#un-modem-lte-4g | 
- Install usb-modeswitch and kmod-usb-net-rndis to switch the LTE stick from USB storage to USB LTE Modem
opkg update
opkg install kmod-usb-net-rndis usb-modeswitch
- Verify the mode did switch, otherwise insert back the key or reboot
root@LEDE:~# lsusb | grep LTE
Bus 002 Device 003: ID 12d1:14dc Huawei Technologies Co., Ltd. E33372 LTE/UMTS/GSM HiLink Modem/Networkcard
- Verify that you have a new network interface (eth2 in my case)
root@LEDE:~# dmesg | grep cdc_ether
[   16.075790] usbcore: registered new interface driver cdc_ether
[   19.232911] cdc_ether 2-1:1.0 eth2: register 'cdc_ether' at usb-f10f8000.usb3-1, CDC Ethernet Device, 0c:5b:8f:xx:xx:xx
- Setup a new wwan interface with eth2 + DHCP mode
uci set network.wwan=interface
uci set network.wwan.ifname='eth2'
uci set network.wwan.proto='dhcp'
uci commit
- Enable firewall on wwan
uci add_list firewall.@zone[1].network='wwan'
uci commit
- Restart Firewall and Network
/etc/init.d/firewall reload
/etc/init.d/network restart