S.K
Junior Member
Hình như v2ray để tạo vpn serverCái này là tạo proxy để cheat 4g bằng sni của viettel à b.
Hình như v2ray để tạo vpn serverCái này là tạo proxy để cheat 4g bằng sni của viettel à b.
DNSCrypt-Proxy : Mã hóa truy vấn đến máy chủ phân giải tên miềnluci-ssl : Cài SSL cho Router
bind-dig : Kiểm tra máy truy vấn từ máy chủ phân giải tên miền
nano : Sửa nội dung file (CTRL+X thoát)
curl : Tải file
htop : Xem chương trình đang chạy
block-mount blockd : Quản lý gắn USB vào router
kmod-macvlan : Tạo Wan ảo
kmod-usb-storage kmod-usb-storage-uas kmod-usb3 : Driver USB
kmod-wireguard : VPN WireGuard
luci-app-commands : Chạy lệnh cài sẵn
luci-app-ddns : Quản lý máy chủ tên miền động (liên kết IP đến DDNS)
luci-app-mwan3 : Bộp băng thông, định tuyến kết nối
luci-app-nlbwmon : Xem băng thông máy con
luci-app-openvpn : Kết nối đến máy chủ VPN giao thức OpenVPN
luci-app-ttyd : Terminal trên Web
luci-app-uhttpd : Cài đặt máy chủ Web
luci-app-vpn-policy-routing : Phân luồng kết nối VPN
luci-app-wireguard : Tạo máy chủ VPN / Kết nối đến máy chủ VPN
luci-app-xwan : Tạo nhiều kết nối mạng qua Wan ảo: https://voz.vn/p/12454085
https://github.com/DNSCrypt/dnscrypt-proxy/wiki/Installation-on-OpenWRT
uci del system.ntp.enabled
uci del system.ntp.enable_server
uci set system.cfg01e48a.zonename='Asia/Ho Chi Minh' # Chọn múi giờ VN
uci set system.cfg01e48a.hostname='Darias' # Đặt tên cho Router
uci set system.cfg01e48a.log_proto='udp'
uci set system.cfg01e48a.conloglevel='8'
uci set system.cfg01e48a.cronloglevel='5'
uci set system.cfg01e48a.timezone='<+07>-7' # Cài múi giờ GMT+7
uci set wireless.default_radio1.key='Mật khẩu'
uci set wireless.default_radio1.ssid='Tên Wifi 5G'
uci set wireless.default_radio1.encryption='psk2+ccmp'
uci set wireless.default_radio0.key='Mật khẩu'
uci set wireless.default_radio0.ssid='Tên Wifi 2G'
uci set wireless.default_radio0.encryption='psk2+ccmp'
uci set wireless.radio0.disabled='0' # Bật Wifi 2G
uci set wireless.radio1.disabled='0' # Bật Wifi 5G
uci set network.lan.ipaddr='10.0.0.1' #Cài IP cho router
uci del network.wan6
uci set network.wan.proto='pppoe'
uci set network.wan.username='Tài khoản Internet'
uci set network.wan.password='Mật khẩu Internet'
uci set network.wan.service='Tên nhà cung cấp dịch vụ'
uci set network.wan.ipv6='0'
uci set network.wan.delegate='0'
uci del network.lan.ip6assign
uci set network.lan.delegate='0'
uci commit && service network restart
uci del firewall.cfg07dc81.network
uci add_list firewall.cfg07dc81.network='wan'
uci add_list firewall.cfg07dc81.network='ao01'
uci add_list firewall.cfg07dc81.network='ao02'
uci add_list firewall.cfg07dc81.network='Nord01'
uci add_list firewall.cfg07dc81.network='Nord02'
uci add_list firewall.cfg07dc81.network='Nord03'
uci add_list firewall.cfg07dc81.network='Nord04'
uci add_list firewall.cfg07dc81.network='Nord05'
uci add_list firewall.cfg07dc81.network='Nord06'
uci add_list firewall.cfg07dc81.network='Nord07'
uci add_list firewall.cfg07dc81.network='Nord08'
uci add_list firewall.cfg07dc81.network='Nord09'
uci add_list firewall.cfg07dc81.network='Nord10'
uci set network.Nord01=interface
uci set network.Nord01.proto='wireguard'
uci set network.Nord01.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord01.listen_port='50309'
uci add_list network.Nord01.addresses='10.5.0.2/16'
uci set network.Nord01.peerdns='0'
uci add_list network.Nord01.dns='103.86.99.98'
uci add_list network.Nord01.dns='103.86.96.98'
uci set network.Nord01.metric='61'
uci set network.Nord01.delegate='0'
uci set network.Nord02=interface
uci set network.Nord02.proto='wireguard'
uci set network.Nord02.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord02.listen_port='31015'
uci add_list network.Nord02.addresses='10.5.0.2/16'
uci set network.Nord02.peerdns='0'
uci add_list network.Nord02.dns='103.86.99.98'
uci add_list network.Nord02.dns='103.86.96.98'
uci set network.Nord02.metric='62'
uci set network.Nord02.delegate='0'
uci set network.Nord03=interface
uci set network.Nord03.proto='wireguard'
uci set network.Nord03.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord03.listen_port='30905'
uci add_list network.Nord03.addresses='10.5.0.2/16'
uci set network.Nord03.peerdns='0'
uci add_list network.Nord03.dns='103.86.99.98'
uci add_list network.Nord03.dns='103.86.96.98'
uci set network.Nord03.metric='63'
uci set network.Nord03.delegate='0'
uci set network.Nord04=interface
uci set network.Nord04.proto='wireguard'
uci set network.Nord04.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord04.listen_port='30822'
uci add_list network.Nord04.addresses='10.5.0.2/16'
uci set network.Nord04.peerdns='0'
uci add_list network.Nord04.dns='103.86.99.98'
uci add_list network.Nord04.dns='103.86.96.98'
uci set network.Nord04.metric='64'
uci set network.Nord04.delegate='0'
uci set network.Nord05=interface
uci set network.Nord05.proto='wireguard'
uci set network.Nord05.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord05.listen_port='30810'
uci add_list network.Nord05.addresses='10.5.0.2/16'
uci set network.Nord05.peerdns='0'
uci add_list network.Nord05.dns='103.86.99.98'
uci add_list network.Nord05.dns='103.86.96.98'
uci set network.Nord05.metric='65'
uci set network.Nord05.delegate='0'
uci set network.Nord06=interface
uci set network.Nord06.proto='wireguard'
uci set network.Nord06.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord06.listen_port='30720'
uci add_list network.Nord06.addresses='10.5.0.2/16'
uci set network.Nord06.peerdns='0'
uci add_list network.Nord06.dns='103.86.99.98'
uci add_list network.Nord06.dns='103.86.96.98'
uci set network.Nord06.metric='66'
uci set network.Nord06.delegate='0'
uci set network.Nord07=interface
uci set network.Nord07.proto='wireguard'
uci set network.Nord07.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord07.listen_port='30719'
uci add_list network.Nord07.addresses='10.5.0.2/16'
uci set network.Nord07.peerdns='0'
uci add_list network.Nord07.dns='103.86.99.98'
uci add_list network.Nord07.dns='103.86.96.98'
uci set network.Nord07.metric='67'
uci set network.Nord07.delegate='0'
uci set network.Nord08=interface
uci set network.Nord08.proto='wireguard'
uci set network.Nord08.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord08.listen_port='30704'
uci add_list network.Nord08.addresses='10.5.0.2/16'
uci set network.Nord08.peerdns='0'
uci add_list network.Nord08.dns='103.86.99.98'
uci add_list network.Nord08.dns='103.86.96.98'
uci set network.Nord08.metric='68'
uci set network.Nord08.delegate='0'
uci set network.Nord09=interface
uci set network.Nord09.proto='wireguard'
uci set network.Nord09.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord09.listen_port='30705'
uci add_list network.Nord09.addresses='10.5.0.2/16'
uci set network.Nord09.peerdns='0'
uci add_list network.Nord09.dns='103.86.99.98'
uci add_list network.Nord09.dns='103.86.96.98'
uci set network.Nord09.metric='69'
uci set network.Nord09.delegate='0'
uci set network.Nord10=interface
uci set network.Nord10.proto='wireguard'
uci set network.Nord10.private_key='Khóa Private của máy chủ NordVPN WireGuard'
uci set network.Nord10.listen_port='30702'
uci add_list network.Nord10.addresses='10.5.0.2/16'
uci set network.Nord10.peerdns='0'
uci add_list network.Nord10.dns='103.86.99.98'
uci add_list network.Nord10.dns='103.86.96.98'
uci set network.Nord10.metric='70'
uci set network.Nord10.delegate='0'
uci commit
# Singapore
uci add network wireguard_Nord01 # =cfg182882
uci set network.@wireguard_Nord01[-1].description='Singapore'
uci set network.@wireguard_Nord01[-1].public_key='U3dKnkOJY5P9p6kEbEDGR7+K2+4HmkKK1hTMugq2HQA='
uci add_list network.@wireguard_Nord01[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord01[-1].endpoint_host='sg455.nordvpn.com'
uci set network.@wireguard_Nord01[-1].endpoint_port='51820'
# Singapore
uci add network wireguard_Nord02 # =cfg182883
uci set network.@wireguard_Nord02[-1].description='Singapore'
uci set network.@wireguard_Nord02[-1].public_key='U3dKnkOJY5P9p6kEbEDGR7+K2+4HmkKK1hTMugq2HQA='
uci add_list network.@wireguard_Nord02[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord02[-1].endpoint_host='sg481.nordvpn.com'
uci set network.@wireguard_Nord02[-1].endpoint_port='51820'
# Hong Kong
uci add network wireguard_Nord03 # =cfg182884
uci set network.@wireguard_Nord03[-1].description='HongKong'
uci set network.@wireguard_Nord03[-1].public_key='+zv+cPRl1pf9hPXFKO3GoVpdBld97Uk3feyeF+9vLBQ='
uci add_list network.@wireguard_Nord03[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord03[-1].endpoint_host='hk210.nordvpn.com'
uci set network.@wireguard_Nord03[-1].endpoint_port='51820'
# Hong Kong
uci add network wireguard_Nord04 # =cfg182885
uci set network.@wireguard_Nord04[-1].description='HongKong'
uci set network.@wireguard_Nord04[-1].public_key='+zv+cPRl1pf9hPXFKO3GoVpdBld97Uk3feyeF+9vLBQ='
uci add_list network.@wireguard_Nord04[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord04[-1].endpoint_host='hk281.nordvpn.com'
uci set network.@wireguard_Nord04[-1].endpoint_port='51820'
# TaiWan
uci add network wireguard_Nord05 # =cfg182886
uci set network.@wireguard_Nord05[-1].description='TaiWan'
uci set network.@wireguard_Nord05[-1].public_key='iW991L6XyB8LWqsmRDDazPv9abbgrKKtR3Y2SGhg/T0='
uci add_list network.@wireguard_Nord05[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord05[-1].endpoint_host='tw44.nordvpn.com'
uci set network.@wireguard_Nord05[-1].endpoint_port='51820'
# TaiWan
uci add network wireguard_Nord06 # =cfg182887
uci set network.@wireguard_Nord06[-1].description='TaiWan'
uci set network.@wireguard_Nord06[-1].public_key='iW991L6XyB8LWqsmRDDazPv9abbgrKKtR3Y2SGhg/T0='
uci add_list network.@wireguard_Nord06[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord06[-1].endpoint_host='tw102.nordvpn.com'
uci set network.@wireguard_Nord06[-1].endpoint_port='51820'
# Korea
uci add network wireguard_Nord07 # =cfg182888
uci set network.@wireguard_Nord07[-1].description='Korea'
uci set network.@wireguard_Nord07[-1].public_key='oHda+iKdBpSlsKzaxz8kiJ1SxXvD9YxzgxOtsNdLjUg='
uci add_list network.@wireguard_Nord07[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord07[-1].endpoint_host='kr33.nordvpn.com'
uci set network.@wireguard_Nord07[-1].endpoint_port='51820'
# Korea
uci add network wireguard_Nord08 # =cfg182889
uci set network.@wireguard_Nord08[-1].description='Korea'
uci set network.@wireguard_Nord08[-1].public_key='oHda+iKdBpSlsKzaxz8kiJ1SxXvD9YxzgxOtsNdLjUg='
uci add_list network.@wireguard_Nord08[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord08[-1].endpoint_host='kr31.nordvpn.com'
uci set network.@wireguard_Nord08[-1].endpoint_port='51820'
# Japan
uci add network wireguard_Nord09 # =cfg182890
uci set network.@wireguard_Nord09[-1].description='Japan'
uci set network.@wireguard_Nord09[-1].public_key='SAio0Z0suFlRfmydzPdcn6MamqS7Mq4pSOm2YmJkLSs='
uci add_list network.@wireguard_Nord09[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord09[-1].endpoint_host='jp596.nordvpn.com'
uci set network.@wireguard_Nord09[-1].endpoint_port='51820'
# Japan
uci add network wireguard_Nord10 # =cfg182891
uci set network.@wireguard_Nord10[-1].description='Japan'
uci set network.@wireguard_Nord10[-1].public_key='SAio0Z0suFlRfmydzPdcn6MamqS7Mq4pSOm2YmJkLSs='
uci add_list network.@wireguard_Nord10[-1].allowed_ips='0.0.0.0/0'
uci set network.@wireguard_Nord10[-1].endpoint_host='jp597.nordvpn.com'
uci set network.@wireguard_Nord10[-1].endpoint_port='51820'
uci commit
# Nord01
# /etc/config/mwan3
uci set mwan3.Nord01=interface
uci set mwan3.Nord01.enabled='1'
uci set mwan3.Nord01.initial_state='online'
uci set mwan3.Nord01.family='ipv4'
uci add_list mwan3.Nord01.track_ip='1.0.0.3'
uci set mwan3.Nord01.track_method='ping'
uci set mwan3.Nord01.reliability='1'
uci set mwan3.Nord01.count='1'
uci set mwan3.Nord01.size='56'
uci set mwan3.Nord01.max_ttl='60'
uci set mwan3.Nord01.check_quality='0'
uci set mwan3.Nord01.timeout='2'
uci set mwan3.Nord01.interval='20'
uci set mwan3.Nord01.failure_interval='5'
uci set mwan3.Nord01.recovery_interval='5'
uci set mwan3.Nord01.down='3'
uci set mwan3.Nord01.up='3'
# Nord02
# /etc/config/mwan3
uci set mwan3.Nord02=interface
uci set mwan3.Nord02.enabled='1'
uci set mwan3.Nord02.initial_state='online'
uci set mwan3.Nord02.family='ipv4'
uci add_list mwan3.Nord02.track_ip='1.0.0.3'
uci set mwan3.Nord02.track_method='ping'
uci set mwan3.Nord02.reliability='1'
uci set mwan3.Nord02.count='1'
uci set mwan3.Nord02.size='56'
uci set mwan3.Nord02.max_ttl='60'
uci set mwan3.Nord02.check_quality='0'
uci set mwan3.Nord02.timeout='2'
uci set mwan3.Nord02.interval='20'
uci set mwan3.Nord02.failure_interval='5'
uci set mwan3.Nord02.recovery_interval='5'
uci set mwan3.Nord02.down='3'
uci set mwan3.Nord02.up='3'
# Nord03
# /etc/config/mwan3
uci set mwan3.Nord03=interface
uci set mwan3.Nord03.enabled='1'
uci set mwan3.Nord03.initial_state='online'
uci set mwan3.Nord03.family='ipv4'
uci add_list mwan3.Nord03.track_ip='1.0.0.3'
uci set mwan3.Nord03.track_method='ping'
uci set mwan3.Nord03.reliability='1'
uci set mwan3.Nord03.count='1'
uci set mwan3.Nord03.size='56'
uci set mwan3.Nord03.max_ttl='60'
uci set mwan3.Nord03.check_quality='0'
uci set mwan3.Nord03.timeout='2'
uci set mwan3.Nord03.interval='20'
uci set mwan3.Nord03.failure_interval='5'
uci set mwan3.Nord03.recovery_interval='5'
uci set mwan3.Nord03.down='3'
uci set mwan3.Nord03.up='3'
# Nord04
# /etc/config/mwan3
uci set mwan3.Nord04=interface
uci set mwan3.Nord04.enabled='1'
uci set mwan3.Nord04.initial_state='online'
uci set mwan3.Nord04.family='ipv4'
uci add_list mwan3.Nord04.track_ip='1.0.0.3'
uci set mwan3.Nord04.track_method='ping'
uci set mwan3.Nord04.reliability='1'
uci set mwan3.Nord04.count='1'
uci set mwan3.Nord04.size='56'
uci set mwan3.Nord04.max_ttl='60'
uci set mwan3.Nord04.check_quality='0'
uci set mwan3.Nord04.timeout='2'
uci set mwan3.Nord04.interval='20'
uci set mwan3.Nord04.failure_interval='5'
uci set mwan3.Nord04.recovery_interval='5'
uci set mwan3.Nord04.down='3'
uci set mwan3.Nord04.up='3'
# Nord05
# /etc/config/mwan3
uci set mwan3.Nord05=interface
uci set mwan3.Nord05.enabled='1'
uci set mwan3.Nord05.initial_state='online'
uci set mwan3.Nord05.family='ipv4'
uci add_list mwan3.Nord05.track_ip='1.0.0.3'
uci set mwan3.Nord05.track_method='ping'
uci set mwan3.Nord05.reliability='1'
uci set mwan3.Nord05.count='1'
uci set mwan3.Nord05.size='56'
uci set mwan3.Nord05.max_ttl='60'
uci set mwan3.Nord05.check_quality='0'
uci set mwan3.Nord05.timeout='2'
uci set mwan3.Nord05.interval='20'
uci set mwan3.Nord05.failure_interval='5'
uci set mwan3.Nord05.recovery_interval='5'
uci set mwan3.Nord05.down='3'
uci set mwan3.Nord05.up='3'
# Nord06
# /etc/config/mwan3
uci set mwan3.Nord06=interface
uci set mwan3.Nord06.enabled='1'
uci set mwan3.Nord06.initial_state='online'
uci set mwan3.Nord06.family='ipv4'
uci add_list mwan3.Nord06.track_ip='1.0.0.3'
uci set mwan3.Nord06.track_method='ping'
uci set mwan3.Nord06.reliability='1'
uci set mwan3.Nord06.count='1'
uci set mwan3.Nord06.size='56'
uci set mwan3.Nord06.max_ttl='60'
uci set mwan3.Nord06.check_quality='0'
uci set mwan3.Nord06.timeout='2'
uci set mwan3.Nord06.interval='20'
uci set mwan3.Nord06.failure_interval='5'
uci set mwan3.Nord06.recovery_interval='5'
uci set mwan3.Nord06.down='3'
uci set mwan3.Nord06.up='3'
# Nord07
# /etc/config/mwan3
uci set mwan3.Nord07=interface
uci set mwan3.Nord07.enabled='1'
uci set mwan3.Nord07.initial_state='online'
uci set mwan3.Nord07.family='ipv4'
uci add_list mwan3.Nord07.track_ip='1.0.0.3'
uci set mwan3.Nord07.track_method='ping'
uci set mwan3.Nord07.reliability='1'
uci set mwan3.Nord07.count='1'
uci set mwan3.Nord07.size='56'
uci set mwan3.Nord07.max_ttl='60'
uci set mwan3.Nord07.check_quality='0'
uci set mwan3.Nord07.timeout='2'
uci set mwan3.Nord07.interval='20'
uci set mwan3.Nord07.failure_interval='5'
uci set mwan3.Nord07.recovery_interval='5'
uci set mwan3.Nord07.down='3'
uci set mwan3.Nord07.up='3'
# Nord08
# /etc/config/mwan3
uci set mwan3.Nord08=interface
uci set mwan3.Nord08.enabled='1'
uci set mwan3.Nord08.initial_state='online'
uci set mwan3.Nord08.family='ipv4'
uci add_list mwan3.Nord08.track_ip='1.0.0.3'
uci set mwan3.Nord08.track_method='ping'
uci set mwan3.Nord08.reliability='1'
uci set mwan3.Nord08.count='1'
uci set mwan3.Nord08.size='56'
uci set mwan3.Nord08.max_ttl='60'
uci set mwan3.Nord08.check_quality='0'
uci set mwan3.Nord08.timeout='2'
uci set mwan3.Nord08.interval='20'
uci set mwan3.Nord08.failure_interval='5'
uci set mwan3.Nord08.recovery_interval='5'
uci set mwan3.Nord08.down='3'
uci set mwan3.Nord08.up='3'
# Nord09
# /etc/config/mwan3
uci set mwan3.Nord09=interface
uci set mwan3.Nord09.enabled='1'
uci set mwan3.Nord09.initial_state='online'
uci set mwan3.Nord09.family='ipv4'
uci add_list mwan3.Nord09.track_ip='1.0.0.3'
uci set mwan3.Nord09.track_method='ping'
uci set mwan3.Nord09.reliability='1'
uci set mwan3.Nord09.count='1'
uci set mwan3.Nord09.size='56'
uci set mwan3.Nord09.max_ttl='60'
uci set mwan3.Nord09.check_quality='0'
uci set mwan3.Nord09.timeout='2'
uci set mwan3.Nord09.interval='20'
uci set mwan3.Nord09.failure_interval='5'
uci set mwan3.Nord09.recovery_interval='5'
uci set mwan3.Nord09.down='3'
uci set mwan3.Nord09.up='3'
# Nord10
# /etc/config/mwan3
uci set mwan3.Nord10=interface
uci set mwan3.Nord10.enabled='1'
uci set mwan3.Nord10.initial_state='online'
uci set mwan3.Nord10.family='ipv4'
uci add_list mwan3.Nord10.track_ip='1.0.0.3'
uci set mwan3.Nord10.track_method='ping'
uci set mwan3.Nord10.reliability='1'
uci set mwan3.Nord10.count='1'
uci set mwan3.Nord10.size='56'
uci set mwan3.Nord10.max_ttl='60'
uci set mwan3.Nord10.check_quality='0'
uci set mwan3.Nord10.timeout='2'
uci set mwan3.Nord10.interval='20'
uci set mwan3.Nord10.failure_interval='5'
uci set mwan3.Nord10.recovery_interval='5'
uci set mwan3.Nord10.down='3'
uci set mwan3.Nord10.up='3'
uci commit
Nếu muốn định tuyến bằng vpn-policy-routing thì# /etc/config/network
uci set network.Nord01.defaultroute='0'
uci set network.Nord02.defaultroute='0'
uci set network.Nord03.defaultroute='0'
uci set network.Nord04.defaultroute='0'
uci set network.Nord05.defaultroute='0'
uci set network.Nord06.defaultroute='0'
uci set network.Nord07.defaultroute='0'
uci set network.Nord08.defaultroute='0'
uci set network.Nord09.defaultroute='0'
uci set network.Nord10.defaultroute='0'
uci set network.cfg182882.persistent_keepalive='25'
uci set network.cfg192883.persistent_keepalive='25'
uci set network.cfg1a2884.persistent_keepalive='25'
uci set network.cfg1b2885.persistent_keepalive='25'
uci set network.cfg1c2886.persistent_keepalive='25'
uci set network.cfg1d2887.persistent_keepalive='25'
uci set network.cfg1f2889.persistent_keepalive='25'
uci set network.cfg1e2888.persistent_keepalive='25'
uci set network.cfg20288a.persistent_keepalive='25'
uci set network.cfg2128a2.persistent_keepalive='25'
uci commit
mkdir -p /etc/ssl/certs; curl -sLo /etc/ssl/certs/cacert.pem https://curl.haxx.se/ca/cacert.pem
mkdir -p /sd; cd /sd; rm -rf /root; ln -s /sd /root
if [ ! -f "/sd/lenh/u" ]; then mkdir -p /sd/lenh
cat > /sd/lenh/u << \EOF
#!/bin/ash
Log="/www/Update.log"
if [ ! -f "$Log" ]; then echo > $Log; fi;
opkg update && opkg upgrade netifd
opkg list-installed | grep -qw luci-ssl || opkg install luci-ssl && /etc/init.d/uhttpd restart
Goi="$(opkg list-upgradable |awk '{print $1}')"
if [ -n "${Goi}" ]; then
opkg upgrade ${Goi}
if [ "$?" -eq 0 ]; then
echo "$(date +"%F %a %T") - Cập nhật thành công" \
exec reboot$Log; echo "$(date +"%F %a %T") - Cập nhật thành công! Đang khởi động lại!!!"
else
echo "$(date +"%F %a %T") - Cập nhật thất bại" >> $Log
fi
else
echo "$(date +"%F %a %T") - Không có cập nhật" >> $Log
fi
cat $Log
EOF
chmod u+x /sd/lenh/u && touch /www/Update.log && echo "/sd/" >> /etc/sysupgrade.conf && echo "/www/Update.log" >> /etc/sysupgrade.conf
fi
ln -s /sd/lenh/u /usr/sbin/u
TM="/sd/m";
if [ ! -d ${TM} ]; then
#Create Mirror
mkdir -p /sd; mkdir -p $TM; mkdir -p $TM/lenh
file="/etc/opkg/distfeeds.conf"; SoDong="$(awk '/freifunk/{ print NR; exit }' $file)"; sed -i ''"$SoDong"'s,^,#,' "$file"
cp /etc/opkg/distfeeds.conf ${TM}/Goc.conf; cp ${TM}/Goc.conf ${TM}/Sin.conf; sed -i -e 's/downloads\.openwrt\.org/mirror\.0x\.sg\/openwrt/g' ${TM}/Sin.conf; cp ${TM}/Goc.conf ${TM}/Aus.conf; sed -i -e 's/downloads\.openwrt\.org/mirror\.kumi\.systems\/openwrt/g' ${TM}/Aus.conf;
echo '#!/bin/bash' > ${TM}/goc; echo 'TM=/sd/m; mkdir -p $TM; cp ${TM}/Goc.conf /etc/opkg/distfeeds.conf' > ${TM}/goc; chmod +x ${TM}/goc;
echo '#!/bin/bash' > ${TM}/sin; echo 'TM=/sd/m; mkdir -p $TM; cp ${TM}/Sin.conf /etc/opkg/distfeeds.conf' > ${TM}/sin; chmod +x ${TM}/sin;
echo '#!/bin/bash' > ${TM}/aus; echo 'TM=/sd/m; mkdir -p $TM; cp ${TM}/Aus.conf /etc/opkg/distfeeds.conf' > ${TM}/aus; chmod +x ${TM}/aus;
#ReStore
#sed -i -e 's/mirror\.0x\.sg\/openwrt/downloads\.openwrt\.org/g' ${TM}/Goc.conf;
sh /sd/m/sin
mv /etc/init.d/auto_usb_mount /sd/lenh/
fi
#!/bin/sh
mkdir -p /sd; mkdir -p /sd/lenh
GoiDaCai="/sd/lenh/cai.pkg"
install_time=$(opkg status kernel | grep Installed-Time | sed "s/Installed-Time: //")
opkg list-installed | awk -F " " '{print $1}' > $GoiDaCai
while read index
do
loop_inst_time=$(opkg status $index | grep Installed-Time | sed "s/Installed-Time: //")
is_user_installed=$(opkg status $index | grep "Status:" | grep "user")
if [ "$loop_inst_time" -ne "$install_time" ] && [ -n "$is_user_installed" ]; then
echo $index
fi
done < $GoiDaCai
ubirmvol /dev/ubi0 -N linux2 && sysupgrade -F /bin/busybox
nếu điện thoại ko xài thì là bình thường, 1 dạng powersave thôi. Còn tối ưu thì cũng khó nói, tùy nhu cầu mà đơn giản nhất là cài thêm cái sqm-qos, adblock, với chỉnh lại cái kênh sóng 2.4 5 cho nó hợp lý.mới cài xong chưa biết để làm , nhưng cho hỏi sao cái đt tốc độ có 1.0 mbit thế, với bác nào có cách config tối ưu cho xin hướng dẫn với, mới nhâp môn ngồi cài từ 4h đến 7h mới xong @@
View attachment 800226
Bài viết hay và hữu ích quá. Tks bác nhiềuMình chia sẽ một số cài đặt mình đang dùng trên Router chạy OpenWRT
Bài viết công phu và hay quá. Like. Nghiên cứu dần.Mình chia sẽ một số cài đặt mình đang dùng trên Router chạy OpenWRT
1. Gói sử dụng:
DNSCrypt-Proxy : Mã hóa truy vấn đến máy chủ phân giải tên miền
Tham khảo cài đặt chi tiết bên dưới:
Ở đây mình sẽ dùng máy chủ phân giải tên miền NextDNS.Code:https://github.com/DNSCrypt/dnscrypt-proxy/wiki/Installation-on-OpenWRT
NextDNS có file chính thức chạy trên OpenWRT (luci-app-nextdns), hiển thị từng clients kết nối đến máy chủ nào. Nhưng mình vẫn thích dùng DNSCrypt-Proxy vì có nhiều lý do.
2. Cấu hình:
# /etc/config/system
# /etc/config/wireless
# /etc/config/dhcp
# /etc/config/network
Sau khi cài đặt mọi thứ OK thì chạy lệnh này để áp dụng
Code:uci commit && service network restart
Cài NordVPN cho WireGuard
Ở đây mình dùng 10 máy chủ NordVPN phân bổ đều cho 5 cụm máy chủ khu vực châu Á gồm: Singapore; Hong Kong, Taiwan, Korea và Japan
Bạn có thể dùng mwan để cân bằng tải, sau đó định tuyến qua cụm VPN này.
Hoặc tùy từng host mà dùng máy chủ VPN cố định.
Bên dưới là mình sẽ thêm các cụm máy chủ VPN vào mWan, còn định tuyến đi đâu thì các bạn tự thêm vô sau nhé!
Thêm giao diện vào tường lửa
# /etc/config/firewall
Tạo giao diện kèm khóa Private NordVPN
# /etc/config/network
# Thêm máy chủ vào khóa Private NordVPN
Nếu cân bằng tải bằng mWan thì dùng lệnh sau:
Cài giữ kết nối và tắt địn tuyến mặc định qua VPN
Nếu muốn định tuyến bằng vpn-policy-routing thì
1. Tạo rule đầu tiên dành cho những máy chủ thường truy cập đi qua wan
2. Tạo 10 rules cho từng máy chủ, định tuyến các host đi qua các máy chủ VPN cho phù hợp để tối ưu nhất.
1 máy chủ có thể có nhiều host
3. Tạo 10 rules cho 10 IP nội bộ. Nếu ai muốn kết nối đến máy chủ nào thì có thể tự đổi IP Wifi để kết nối tới máy chủ đó.
Cũng có thể thêm nhiều IP cho 1 rules.
_______________________________________________________________________
Tạo thư mục và cài cert
Code:mkdir -p /etc/ssl/certs; curl -sLo /etc/ssl/certs/cacert.pem https://curl.haxx.se/ca/cacert.pem mkdir -p /sd; cd /sd; rm -rf /root; ln -s /sd /root
# Cập nhật gói đã cài
# Chuyển máy chủ OpenWRT mặc định sang Sin để cải thiện tốc độ tải gói.
# Xoá phân vùng OpenWRT và khởi động vào chế độ phục hồi
Code:ubirmvol /dev/ubi0 -N linux2 && sysupgrade -F /bin/busybox
được rồi thím ạ, quay về cài bàn 19.07 rồi set thêm mỗi cái gateway của router chính là có mạng luôn. dễ thế mà cứ mò mãiKo được thì để vứt cho thím config lan-wan mà vẫn cùng lớp mạng & cài được package
# Sao lưu tên các gói đã cài đặt vào file text
Có cách chính thức đc openwrt hỗ trợ đơn giản & dễ hiểu hơn:À bác có thể hướng dẫn backup toàn bộ các soft đã cài và cấu hình đã cài ở bản fw đang dùng được không ?
sysupgrade -k -b /tmp/tênfilebackup.tar.gz
opkg update
grep "\toverlay" /etc/backup/installed_packages.txt | cut -f1 | xargs -r opkg install
rm /etc/backup/installed_packages.txt
Quá bổ ích
1. Gói sử dụng:
DNSCrypt-Proxy : Mã hóa truy vấn đến máy chủ phân giải tên miền
Tham khảo cài đặt chi tiết bên dưới:
Ở đây mình sẽ dùng máy chủ phân giải tên miền NextDNS.Code:https://github.com/DNSCrypt/dnscrypt-proxy/wiki/Installation-on-OpenWRT
NextDNS có file chính thức chạy trên OpenWRT (luci-app-nextdns), hiển thị từng clients kết nối đến máy chủ nào. Nhưng mình vẫn thích dùng DNSCrypt-Proxy vì có nhiều lý do.
2. Cấu hình:
# /etc/config/system
# /etc/config/wireless
# /etc/config/dhcp
# /etc/config/network
Sau khi cài đặt mọi thứ OK thì chạy lệnh này để áp dụng
Code:uci commit && service network restart
Cài NordVPN cho WireGuard
Ở đây mình dùng 10 máy chủ NordVPN phân bổ đều cho 5 cụm máy chủ khu vực châu Á gồm: Singapore; Hong Kong, Taiwan, Korea và Japan
Bạn có thể dùng mwan để cân bằng tải, sau đó định tuyến qua cụm VPN này.
Hoặc tùy từng host mà dùng máy chủ VPN cố định.
Bên dưới là mình sẽ thêm các cụm máy chủ VPN vào mWan, còn định tuyến đi đâu thì các bạn tự thêm vô sau nhé!
Thêm giao diện vào tường lửa
# /etc/config/firewall
Tạo giao diện kèm khóa Private NordVPN
# /etc/config/network
# Thêm máy chủ vào khóa Private NordVPN
Nếu cân bằng tải bằng mWan thì dùng lệnh sau:
Cài giữ kết nối và tắt địn tuyến mặc định qua VPN
Nếu muốn định tuyến bằng vpn-policy-routing thì
1. Tạo rule đầu tiên dành cho những máy chủ thường truy cập đi qua wan
2. Tạo 10 rules cho từng máy chủ, định tuyến các host đi qua các máy chủ VPN cho phù hợp để tối ưu nhất.
1 máy chủ có thể có nhiều host
3. Tạo 10 rules cho 10 IP nội bộ. Nếu ai muốn kết nối đến máy chủ nào thì có thể tự đổi IP Wifi để kết nối tới máy chủ đó.
Cũng có thể thêm nhiều IP cho 1 rules.
_______________________________________________________________________
Tạo thư mục và cài cert
Code:mkdir -p /etc/ssl/certs; curl -sLo /etc/ssl/certs/cacert.pem https://curl.haxx.se/ca/cacert.pem mkdir -p /sd; cd /sd; rm -rf /root; ln -s /sd /root
# Cập nhật gói đã cài
# Chuyển máy chủ OpenWRT mặc định sang Sin để cải thiện tốc độ tải gói.
# Sao lưu tên các gói đã cài đặt vào file text
# Xoá phân vùng OpenWRT và khởi động vào chế độ phục hồi
Code:ubirmvol /dev/ubi0 -N linux2 && sysupgrade -F /bin/busybox
Vào phần phục hồi trong luci chọn cái file "tênfilebackup.tar.gz" bấm restore hay chép vô thư mục trong router bác.Có cách chính thức đc openwrt hỗ trợ đơn giản & dễ hiểu hơn:
- ssh vô router rồi chạy lệnh này để tạo file backup cấu hình, nó sẽ kèm luôn danh sách các gói packages đã cài đặt: (lưu ý dùng Luci-gui backup cấu hình sẽ ko đc đâu nhé)
Xong dùng lệnh hoặc winscp copy tênfilebackup.tar.gz trong /tmp ra chỗ khác.Code:sysupgrade -k -b /tmp/tênfilebackup.tar.gz
- Cài lại fw Openwrt xong restore file backup ở trên, reboot router chờ có mạng lại ròi ssh vô router chạy lần lượt lệnh sau:
Code:opkg update grep "\toverlay" /etc/backup/installed_packages.txt | cut -f1 | xargs -r opkg install rm /etc/backup/installed_packages.txt
Có cách chính thức đc openwrt hỗ trợ đơn giản & dễ hiểu hơn:
- ssh vô router rồi chạy lệnh này để tạo file backup cấu hình, nó sẽ kèm luôn danh sách các gói packages đã cài đặt: (lưu ý dùng Luci-gui backup cấu hình sẽ ko đc đâu nhé)
Xong dùng lệnh hoặc winscp copy tênfilebackup.tar.gz trong /tmp ra chỗ khác.Code:sysupgrade -k -b /tmp/tênfilebackup.tar.gz
- Cài lại fw Openwrt xong restore file backup ở trên, reboot router chờ có mạng lại ròi ssh vô router chạy lần lượt lệnh sau:
Code:opkg update grep "\toverlay" /etc/backup/installed_packages.txt | cut -f1 | xargs -r opkg install rm /etc/backup/installed_packages.txt
Tue Oct 5 12:32:10 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:32:24 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:32:45 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:33:36 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:35:25 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:35:37 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:36:05 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:36:37 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:37:29 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:37:42 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:37:59 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:38:20 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:40:09 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:40:22 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:40:40 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:41:04 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:42:20 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:42:31 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:42:45 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:43:39 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:45:22 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:45:34 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:45:45 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:46:13 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Tue Oct 5 12:47:15 2021 daemon.warn dnsmasq[32713]: possible DNS-rebind attack detected: nexus-websocket-a.intercom.io
Đúng ròi, dùng luci để restore.Vào phần phục hồi trong luci chọn cái file "tênfilebackup.tar.gz" bấm restore
Có 3 cách tắt:hi bác, mình thấy nó thông báo trong log nhiều quá, nó còn dài nữa cơ. bác có cách nào tắt cái thông báo này đi được không ?
Bạn tham khảo CR6608 bên dưới xem sao nhé!cho em hỏi tầm 500-1m có con moderm nào up OpenWrt ngon bổ rẻ nhỉ. Cao hơn thì có con nào ạ.
https://shopee.vn/cafetuyen/7181537912
Sao giống con AX1800 nhỉBạn tham khảo CR6608 bên dưới xem sao nhé!
Code:https://shopee.vn/cafetuyen/7181537912
trên group FB 3d2 có bác hướng dẫn đó bác, thấy nhiều bước hơn 19.0.7 nên thôi ở lại 19 cho lành.Có thím nào trộn luồn IPTV của VNPT trên version 21.02 chưa? cho xin ít kinh nghiệm vs. chiều giờ ngồi mò hoài mà chưa dc. hix
uhm, thank thím, chuyển sang DSA nên mò mệt vãi. hixtrên group FB 3d2 có bác hướng dẫn đó bác, thấy nhiều bước hơn 19.0.7 nên thôi ở lại 19 cho lành.
Lên 21 quản lý dạng DSA không quen lắm
IPTV thì đâu cần igmp proxy đâu nhỉ. Chỉ cần chỉnh firewall đẩy traffic từ 224.0.0.0/4 thì đi qua IPTV interface là đc rồi.uhm, thank thím, chuyển sang DSA nên mò mệt vãi. hix
PS: Đã làm dc. Thiếu mỗi bước omcproxy. hix
theo tôi thì ko nên mua . cấu hình củ chuối . Port wan , lan 100Mbps , bộ nhớ trong chỉ có 16MB sẽ rất hạn chế khi cài thêm app . đi kiếm mấy con 3d2 hàng người dùng bán lại tầm 400k ngon hơn .đang ngó em này ko biết ổn ko
View attachment 802721