====== OpenWRT ======
===== Image download =====
- https://downloads.openwrt.org/releases/19.07.4/targets/x86/64/
- https://downloads.openwrt.org/releases/19.07.4/targets/x86/64/openwrt-19.07.4-x86-64-combined-squashfs.img.gz
==== Unzip ====
gzip -d openwrt-19.07.4-x86-64-combined-squashfs.img.gz
===== Update network config =====
After install the image in the VMM, need to update the network config(/etc/config/network)
- gateway
- dns
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
option ip6assign '60'
option multipath 'on'
option gateway '192.168.1.1'
list dns '8.8.8.8'
config interface 'wan'
option ifname 'eth1'
option proto 'dhcp'
===== Install luci =====
- https://openwrt.org/docs/guide-user/luci/luci.essentials
opkg update
opkg install luci
===== Install tools =====
```
opkg install curl unzip wget-ssl ipset
```
===== Install v2ray =====
Download the v2ray from
- https://github.com/v2ray/v2ray-core/releases
I use my VPS to download it first
wget https://ef.pjq.me/download/openwrt/v2ray-linux-64.zip
unzip v2ray-linux-64.zip -d v2ray
===== Install BBR =====
opkg install kmod-tcp-bbr
insmod kmod-tcp-bbr
lsmod|grep bbr
vim /etc/sysctl.conf
And add the following:
net.core.default_qdisc=fq_codel
net.ipv4.tcp_congestion_control=bbr
Then reload the setting
sysctl -p
lsmod|grep bbr
tcp_bbr 16384 35
===== Update hosts =====
vim /etc/config/dhcp
Add the `list addnhosts '/etc/myhosts'`
config dnsmasq ...
list addnhosts '/etc/myhosts'
Then add your hosts to /etc/myhosts
vim /etc/myhosts
Then restart the dnsmasq service
/etc/init.d/dnsmasq restart
===== eth0/lan doesn't work =====
The network eth0 doesn't work, and saw the log
device eth0 entered promiscuous mode
After google, I try to disable promiscuous mode.
ifconfig eth0 -promisc
- https://help.aliyun.com/document_detail/41541.html
- https://ieevee.com/tech/2016/11/24/promisc.html