Difference between revisions of "Template:FriendlyWrt19"
(updated by API) |
(updated by API) |
||
Line 4: | Line 4: | ||
===Account & Password=== | ===Account & Password=== | ||
− | + | The default password is password (empty password in some versions). Please set or change a safer password for web login and ssh login. It is recommended to complete this setting before connecting {{{1}}} to the Internet. | |
===Network Connection=== | ===Network Connection=== | ||
Line 10: | Line 10: | ||
===Login FriendlyWrt=== | ===Login FriendlyWrt=== | ||
− | + | Connect the PC to the LAN port of {{{1}}}. If your PC without a built-in ethernet port, connect the LAN port of the wireless AP to the LAN port of {{{1}}}, and then connect your PC to the wireless AP via WiFi , Enter the following URL on your PC's browser to access the admin page: <br /> | |
− | + | * http://friendlywrt/ | |
+ | * http://192.168.2.1/ | ||
+ | * http://[fd00:ab:cd::1] | ||
+ | The above is the LAN port address of {{{1}}}. The IP address of the WAN port will be dynamically obtained from your main router through DHCP.<br /> | ||
+ | |||
+ | ===Recommended security settings=== | ||
+ | The following settings are highly recommended to complete before connecting {{{1}}} to the Internet。 | ||
+ | * Set a secure password | ||
+ | * Only allow access to ssh from lan, change the port | ||
+ | * Only allow local devices to access luci | ||
+ | Edit /etc/config/uhttpd,Change the original 0.0.0.0 and [::] addresses to the local lan address, for example: | ||
+ | <syntaxhighlight lang="text"> | ||
+ | # HTTP listen addresses, multiple allowed | ||
+ | list listen_http 192.168.2.1:80 | ||
+ | list listen_http [fd00:ab:cd::1]:80 | ||
+ | |||
+ | # HTTPS listen addresses, multiple allowed | ||
+ | list listen_https 192.168.2.1:443 | ||
+ | list listen_https [fd00:ab:cd::1]:443 | ||
+ | </syntaxhighlight> | ||
+ | Restart the service: | ||
+ | <syntaxhighlight lang="text"> | ||
+ | /etc/init.d/uhttpd restart | ||
+ | </syntaxhighlight> | ||
===Install Software Packages=== | ===Install Software Packages=== | ||
Line 39: | Line 62: | ||
$ opkg remove <package names> | $ opkg remove <package names> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | ===Disable IPv6=== | ||
+ | <syntaxhighlight lang="text"> | ||
+ | uci set 'network.lan.ipv6=off' | ||
+ | uci set 'network.lan.delegate=0' | ||
+ | uci set 'network.lan.force_link=0' | ||
+ | uci set 'network.wan.ipv6=0' | ||
+ | uci set 'network.wan.delegate=0' | ||
+ | uci delete 'network.wan6' | ||
+ | uci commit network | ||
+ | uci set 'dhcp.lan.dhcpv6=disabled' | ||
+ | uci set 'dhcp.lan.ra=disabled' | ||
+ | uci commit dhcp | ||
+ | /etc/init.d/odhcpd restart | ||
+ | /etc/init.d/dnsmasq restart | ||
+ | /etc/init.d/network restart | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ===Some common issues of FriendlyWrt=== | ||
+ | * Unable to dial up | ||
+ | ** Go to "Network" -> "Firewall" and set "Inbound Data", "Outbound Data" and "Forwarding" in "WAN Zone" to "Accept"; | ||
+ | ** If you still cannot access the Internet, you can try to turn off IPV6; | ||
+ | * Unable to power on | ||
+ | ** Try to replace the power adapter and cable. It is recommended to use a power supply with specifications above 5V/2A; | ||
+ | ** Note that some fast chargers with Type-C interface will have a delay, it may take a few seconds to start providing power; | ||
+ | |||
+ | ===Let FriendlyWrt regenerate network settings=== | ||
+ | This method will trigger FriendlyWrt to re-identify the hardware model and generate the network configuration under /etc/config, which is similar but not completely equivalent to restoring factory settings:<br /> | ||
+ | <syntaxhighlight lang="text"> | ||
+ | rm -f /etc/board.json /etc/config/system /etc/config/network /etc/config/wireless /etc/firstboot_* | ||
+ | reboot | ||
+ | </syntaxhighlight> | ||
+ | The /root/setup.sh initialization script will be executed again at the next boot, so you can debug the /root/setup.sh script through this method. | ||
+ | |||
+ | ===Use USB2LCD to view IP and temperature=== | ||
+ | Plug the USB2LCD module to the USB interface of'''{{{1}}}''' and power on, the IP address and CPU temperature will be displayed on the LCD:<br /> | ||
+ | {{#switch: {{{1}}} | ||
+ | | NanoPi-R2S = | ||
+ | [[File:R2S-usb2lcd-01.jpg|frameless|600px]]<br /> | ||
+ | | #default = | ||
+ | }} | ||
===Work with USB WiFi Device=== | ===Work with USB WiFi Device=== |
Revision as of 06:40, 8 December 2020
Contents
- 1 Work with FriendlyWrt
- 1.1 Introduction to FriendlyWrt
- 1.2 Account & Password
- 1.3 Network Connection
- 1.4 Login FriendlyWrt
- 1.5 Recommended security settings
- 1.6 Install Software Packages
- 1.7 Disable IPv6
- 1.8 Some common issues of FriendlyWrt
- 1.9 Let FriendlyWrt regenerate network settings
- 1.10 Use USB2LCD to view IP and temperature
- 1.11 Work with USB WiFi Device
- 1.12 Work with Docker Applications
- 1.13 Mount smbfs
1 Work with FriendlyWrt
1.1 Introduction to FriendlyWrt
FriendlyWrt is a customized system made by FriendlyElec based on an OpenWrt distribution. It is open source and well suitable for developing IoT applications, NAS applications, smart home gateways etc.
1.2 Account & Password
The default password is password (empty password in some versions). Please set or change a safer password for web login and ssh login. It is recommended to complete this setting before connecting {{{1}}} to the Internet.
1.3 Network Connection
Use a network cable to connect {{{1}}}'s WAN to a master router and the board will get an IP address via DHCP. Login into the router and check {{{1}}}'s IP address.
1.4 Login FriendlyWrt
Connect the PC to the LAN port of {{{1}}}. If your PC without a built-in ethernet port, connect the LAN port of the wireless AP to the LAN port of {{{1}}}, and then connect your PC to the wireless AP via WiFi , Enter the following URL on your PC's browser to access the admin page:
- http://friendlywrt/
- http://192.168.2.1/
- http://[fd00:ab:cd::1]
The above is the LAN port address of {{{1}}}. The IP address of the WAN port will be dynamically obtained from your main router through DHCP.
1.5 Recommended security settings
The following settings are highly recommended to complete before connecting {{{1}}} to the Internet。
- Set a secure password
- Only allow access to ssh from lan, change the port
- Only allow local devices to access luci
Edit /etc/config/uhttpd,Change the original 0.0.0.0 and [::] addresses to the local lan address, for example:
# HTTP listen addresses, multiple allowed list listen_http 192.168.2.1:80 list listen_http [fd00:ab:cd::1]:80 # HTTPS listen addresses, multiple allowed list listen_https 192.168.2.1:443 list listen_https [fd00:ab:cd::1]:443
Restart the service:
/etc/init.d/uhttpd restart
1.6 Install Software Packages
1.6.1 Update Package List
Before install software packages update the package list:
$ opkg update
1.6.2 List Available Packages
$ opkg list
1.6.3 List Installed Packages
$ opkg list-installed
1.6.4 Install Packages
$ opkg install <package names>
1.6.5 Remove Packages
$ opkg remove <package names>
1.7 Disable IPv6
uci set 'network.lan.ipv6=off' uci set 'network.lan.delegate=0' uci set 'network.lan.force_link=0' uci set 'network.wan.ipv6=0' uci set 'network.wan.delegate=0' uci delete 'network.wan6' uci commit network uci set 'dhcp.lan.dhcpv6=disabled' uci set 'dhcp.lan.ra=disabled' uci commit dhcp /etc/init.d/odhcpd restart /etc/init.d/dnsmasq restart /etc/init.d/network restart
1.8 Some common issues of FriendlyWrt
- Unable to dial up
- Go to "Network" -> "Firewall" and set "Inbound Data", "Outbound Data" and "Forwarding" in "WAN Zone" to "Accept";
- If you still cannot access the Internet, you can try to turn off IPV6;
- Unable to power on
- Try to replace the power adapter and cable. It is recommended to use a power supply with specifications above 5V/2A;
- Note that some fast chargers with Type-C interface will have a delay, it may take a few seconds to start providing power;
1.9 Let FriendlyWrt regenerate network settings
This method will trigger FriendlyWrt to re-identify the hardware model and generate the network configuration under /etc/config, which is similar but not completely equivalent to restoring factory settings:
rm -f /etc/board.json /etc/config/system /etc/config/network /etc/config/wireless /etc/firstboot_* reboot
The /root/setup.sh initialization script will be executed again at the next boot, so you can debug the /root/setup.sh script through this method.
1.10 Use USB2LCD to view IP and temperature
Plug the USB2LCD module to the USB interface of{{{1}}} and power on, the IP address and CPU temperature will be displayed on the LCD:
1.11 Work with USB WiFi Device
1.11.1 Check USB WiFi Device with Command Line Utility
(1) Click on "services>ttyd" to start the command line utility
(2) Make sure no USB devices are connected to your board and run the following command to check if any USB devices are connected or not
lsusb
(3) Connect a USB WiFi device to the board and run the command again
lsusb
You will see a new device is detected. In our test the device's ID was 0BDA:C811
(4) Type your device's ID (in our case it was "0BDA:C811" or "VID_0BDA&PID_C811") in a search engine and you may find a device that matches the ID. In our case the device we got was Realtek 8811CU.
1.11.2 Configure a USB WiFi Device as AP
(1) Connect a USB WiFi device to the {{{1}}}. We recommend you to use the following devices:
Note: devices that match these VID&PIDs would most likely work.
(2) Click on "System>Reboot" and reboot your {{{1}}}
(3) Click on "Network>Wireless" to enter the WiFi configuration page
(4) Click on "Edit" to edit the configuration
(5) On the "Interface Configuration" page you can set the WiFi mode and SSID, and then go to "Wireless Security" to change the password. By default the password is "password". After you make your changes click on "Save" to save
(6) After you change the settings you can use a smartphone or PC to search for WiFi
1.12 Work with Docker Applications
1.12.1 Work with Docker: Install JellyBin
mkdir -p /jellyfin/config mkdir -p /jellyfin/videos docker run --restart=always -d -p 8096:8096 -v /jellyfin/config:/config -v /jellyfin/videos:/videos jellyfin/jellyfin:10.1.0-arm64 -name myjellyfin
After installation, visit port 8096 and here is what you would find:
1.12.2 Work with Docker: Install Personal Nextcloud
mkdir /nextcloud -p docker run -d -p 8888:80 --name nextcloud -v /nextcloud/:/var/www/html/ --restart=always --privileged=true arm64v8/nextcloud
After installtion, visit port 8888.
1.13 Mount smbfs
mount -t cifs //192.168.1.10/shared /movie -o username=xxx,password=yyy,file_mode=0644