1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Try to fix DNS issue

This commit is contained in:
Ycarus (Yannick Chabanois) 2022-08-11 08:53:11 +02:00
parent bcafb1ee4d
commit 462dbc2dea
2 changed files with 20 additions and 9 deletions

View file

@ -32,7 +32,7 @@ set_ipv6_state() {
if [ "$disable_ipv6" = "1" ]; then if [ "$disable_ipv6" = "1" ]; then
logger -t "omr-6in4" "Disable IPv6" logger -t "omr-6in4" "Disable IPv6"
uci -q batch <<-EOF >/dev/null uci -q batch <<-EOF >/dev/null
set unbound.ub_main.protocol='ip4_only' set unbound.@unbound[-1].protocol='ip4_only'
commit unbound commit unbound
del_list v2ray.main.inbounds="omr6" del_list v2ray.main.inbounds="omr6"
commit v2ray commit v2ray
@ -50,7 +50,7 @@ set_ipv6_state() {
set network.omr6in4.force_link=1 set network.omr6in4.force_link=1
set network.omr6in4.metric=1 set network.omr6in4.metric=1
delete network.omr6in4.auto delete network.omr6in4.auto
set unbound.ub_main.protocol='mixed' set unbound.@unbound[-1].protocol='mixed'
commit unbound commit unbound
EOF EOF
if [ "$(uci -q get network.globals.ula_prefix)" = "" ]; then if [ "$(uci -q get network.globals.ula_prefix)" = "" ]; then

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then if [ "$(uci -q get openmptcprouter.settings.version)" = "" ]; then
if [ "$(uci -q get unbound.@unbound[0].listen_port | grep 5353)" = "" ]; then if [ "$(uci -q get unbound.@unbound[-1].listen_port | grep 5353)" = "" ]; then
uci -q batch <<-EOF >/dev/null uci -q batch <<-EOF >/dev/null
set unbound.@unbound[-1].listen_port=5353 set unbound.@unbound[-1].listen_port=5353
set unbound.@unbound[-1].protocol="ip4_only" set unbound.@unbound[-1].protocol="ip4_only"
@ -8,11 +8,11 @@ if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
set unbound.@unbound[-1].recursion="aggressive" set unbound.@unbound[-1].recursion="aggressive"
set unbound.@unbound[-1].validator='1' set unbound.@unbound[-1].validator='1'
set unbound.@unbound[-1].validator_ntp='1' set unbound.@unbound[-1].validator_ntp='1'
del unbound.ub_main.dns64_prefix del unbound.@unbound[-1].dns64_prefix
del unbound.ub_main.iface_wan del unbound.@unbound[-1].iface_wan
del unbound.ub_main.dhcp4_slaac6 del unbound.@unbound[-1].dhcp4_slaac6
del unbound.ub_main.query_minimize del unbound.@unbound[-1].query_minimize
del unbound.ub_main.query_min_strict del unbound.@unbound[-1].query_min_strict
commit unbound commit unbound
EOF EOF
fi fi
@ -24,6 +24,13 @@ if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
EOF EOF
fi fi
fi fi
if [ -z "$(uci -q get unbound.ub_main)" ]; then
uci -q batch <<-EOF >/dev/null
rename unbound.@unbound[-1]=ub_main
commit unbound
EOF
fi
if [ "$(uci -q show dhcp | grep 'use-application-dns.net')" = "" ]; then if [ "$(uci -q show dhcp | grep 'use-application-dns.net')" = "" ]; then
uci -q batch <<-EOF >/dev/null uci -q batch <<-EOF >/dev/null
add_list dhcp.@dnsmasq[-1].server="/use-application-dns.net/" add_list dhcp.@dnsmasq[-1].server="/use-application-dns.net/"
@ -66,6 +73,7 @@ fi
if [ -z "$(uci -q show unbound.auth_icann)" ]; then if [ -z "$(uci -q show unbound.auth_icann)" ]; then
uci -q batch <<-EOF >/dev/null uci -q batch <<-EOF >/dev/null
del unbound.auth_icann
set unbound.auth_icann=zone set unbound.auth_icann=zone
set unbound.auth_icann.fallback='1' set unbound.auth_icann.fallback='1'
set unbound.auth_icann.url_dir='https://www.internic.net/domain/' set unbound.auth_icann.url_dir='https://www.internic.net/domain/'
@ -77,6 +85,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
add_list unbound.auth_icann.zone_name='in-addr.arpa.' add_list unbound.auth_icann.zone_name='in-addr.arpa.'
add_list unbound.auth_icann.zone_name='ip6.arpa.' add_list unbound.auth_icann.zone_name='ip6.arpa.'
set unbound.auth_icann.enabled='1' set unbound.auth_icann.enabled='1'
del unbound.fwd_isp
set unbound.fwd_isp=zone set unbound.fwd_isp=zone
set unbound.fwd_isp.enabled='0' set unbound.fwd_isp.enabled='0'
set unbound.fwd_isp.fallback='1' set unbound.fwd_isp.fallback='1'
@ -84,6 +93,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
set unbound.fwd_isp.zone_type='forward_zone' set unbound.fwd_isp.zone_type='forward_zone'
add_list unbound.fwd_isp.zone_name='isp-bill.example.com.' add_list unbound.fwd_isp.zone_name='isp-bill.example.com.'
add_list unbound.fwd_isp.zone_name='isp-mail.example.net.' add_list unbound.fwd_isp.zone_name='isp-mail.example.net.'
del unbound.fwd_google
set unbound.fwd_google=zone set unbound.fwd_google=zone
set unbound.fwd_google.enabled='0' set unbound.fwd_google.enabled='0'
set unbound.fwd_google.fallback='1' set unbound.fwd_google.fallback='1'
@ -95,6 +105,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
add_list unbound.fwd_google.server='2001:4860:4860::8844' add_list unbound.fwd_google.server='2001:4860:4860::8844'
add_list unbound.fwd_google.server='2001:4860:4860::8888' add_list unbound.fwd_google.server='2001:4860:4860::8888'
set unbound.fwd_google.zone_name='.' set unbound.fwd_google.zone_name='.'
del unbound.fwd_cloudflare
set unbound.fwd_cloudflare=zone set unbound.fwd_cloudflare=zone
set unbound.fwd_cloudflare.enabled='0' set unbound.fwd_cloudflare.enabled='0'
set unbound.fwd_cloudflare.fallback='1' set unbound.fwd_cloudflare.fallback='1'