OpenWrt
原创2022/4/1...大约 1 分钟
OpenWrt
tips
:::: code-group
::: code-group-item 常用:active
opkg install qemu-ga
option http_proxy http://192.168.1.1:10808
opkg install kmod-usb-hid:::
::: code-group-item softether
opkg install softethervpn_4.22-9634-1_x86_64.ipk && \
# /etc/init.d/softethervpnbridge stop && \
/etc/init.d/softethervpnclient stop && \
/etc/init.d/softethervpnserver stop && \
# /etc/init.d/softethervpnbridge disable && \
/etc/init.d/softethervpnclient disable && \
/etc/init.d/softethervpnserver disable && \
rm /usr/libexec/softethervpn/vpn_client.config \
/usr/libexec/softethervpn/vpn_server.config && \
rm -r /usr/libexec/softethervpn/*_log \
/usr/libexec/softethervpn/backup.vpn_*.config && \
rm /usr/libexec/softethervpn/.ctl_* \
/usr/libexec/softethervpn/.pid_* \
/usr/libexec/softethervpn/.VPN-* && \
vpncmd /server localhost /cmd ServerPasswordSet YOUR_PASSWORD && \
vpncmd /server localhost /PASSWORD:YOUR_PASSWORD /IN:svpn-hd18.txt:::
::: code-group-item sysctl.conf
echo "" >>/etc/sysctl.conf
echo "net.netfilter.nf_conntrack_buckets=16384" >>/etc/sysctl.conf
echo "net.netfilter.nf_conntrack_max=65536" >>/etc/sysctl.conf:::
::: code-group-item grub.cfg
umount /boot && umount /boot && \
mount -o rw,noatime,block_validity,delalloc,barrier,user_xattr /dev/sda1 /boot
sed -i "s/timeout=\"5\"/timeout=\"1\"/g" /boot/boot/grub/grub.cfg:::
::::
x86版本tip
squashfs 自带重置
ext4 也可以重置,但可靠性不如squashfs
squashfs为只读,配合jffs2做配置
combined = boot+rootfs
Using the Image Builder
apt-get install build-essential \
libncurses5-dev zlib1g-dev \
gawk git ccache gettext \
libssl-dev xsltproc wget unzip python
wget https://downloads.openwrt.org/releases/18.06.1/targets/x86/64/openwrt-imagebuilder-18.06.1-x86-64.Linux-x86_64.tar.xz
tar xvJf openwrt-imagebuilder-18.06.1-x86-64.Linux-x86_64.tar.xz
mv openwrt-imagebuilder-18.06.1-x86-64.Linux-x86_64 openwrt-imagebuilderapt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc wget unzip python
sudo parted /dev/sdb1
mkpart ESP fat32 1MiB 101MiB
set 1 boot on
mkpart boot ext2 101MiB 201MiB
mkpart root ext4 201MiB 457MiB
grub-install --target=x86_64-efi \
--efi-directory=/mnt/sdb1 --boot-directory=/mnt/sdb2 \
--bootloader-id=gruboray_ddns_ipv4
http://[USERNAME]:[PASSWORD]@ddns.oray.com/ph/update?&hostname=[DOMAIN]&myip=[IP]
hfhome.imwork.net
xxy1991
vlan
驱动级vlan
和普通接口桥接自动untagged