FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
915 views 1 comments
by anonymous
I can't resolve hostnames,

FW ver.: RUT2XX_R_00.01.14.5

I can't remotely update firware due RUT240 could be rebooted during firmware upgrade due to external hardware.
How can I force new DNS server?
Main WAN is mobile, I already forced DNS to 8.8.8.8 instead DNS by peer.

root@Teltonika-RUT240:~# cat /etc/resolv.conf
search lan
nameserver 127.0.0.1
nameserver ::1

echo "nameserver 8.8.8.8" >>  /etc/resolv.conf

Still not working.
Any suggestions?
Thanks.
by anonymous
/etc/resolv.conf is a link to /tmp/resolv.conf, created by /etc/init.d/

echo "nameserver 8.8.8.8" >>  /etc/resolv.conf

cat /etc/resolv.conf
search lan
nameserver 127.0.0.1
nameserver ::1
nameserver 8.8.8.8

This solution is not working.

search lan
nameserver 8.8.8.8
nameserver 127.0.0.1
nameserver ::1

This solution is working.

To do this I changed code in dnsmasq:

#DNS_SERVERS="127.0.0.1 ::1 $DNS_SERVERS" # original code
        DNS_SERVERS="8.8.8.8 127.0.0.1 ::1 $DNS_SERVERS" # my code

I don't know why I get this problem.

2 Answers

0 votes
by anonymous

This solution is working.

To do this I changed code in dnsmasq:

#DNS_SERVERS="127.0.0.1 ::1 $DNS_SERVERS" # original code
        DNS_SERVERS="8.8.8.8 127.0.0.1 ::1 $DNS_SERVERS" # my code

Best answer
0 votes
by anonymous

Updated RUT240 firmware to RUT2_R_00.07.01.4 on four devices, often I find one device with DDNS not running:

On web interface, on DDNS page, I can see:

Status: Stopped
Hostname: ***.dydns.org
IP: -

My logread:

[...]
Tue May 10 16:10:51 2022 user.warn ddns-scripts[14961]: myddns: NO valid IP found
Tue May 10 16:10:57 2022 user.err ddns-scripts[14961]: myddns: cURL Error: 6
Tue May 10 16:10:57 2022 user.warn ddns-scripts[14961]: myddns: Transfer failed - retry 1/0 in 60 seconds
[...]

Here my configuration:

root@RUT240-Patocco:~# cat /etc/config/ddns

config ddns 'global'
        option ddns_dateformat '%F %R'
        option ddns_loglines '250'
        option upd_privateip '1'

config service 'myddns'
        option lookup_host '****.dyndns.org'
        option domain '****.dyndns.org'
        option username '****'
        option password '****'
        option check_unit 'minutes'
        option force_interval '10'
        option force_unit 'hours'
        option check_interval '5'
        option enabled '1'
        option ip_source 'web'
        option ip_url 'http://checkip.dyndns.com'
        option service_name 'dyndns.org'
 

Browsing on the web, talking about Openwrt, it was said to change interface, so I tested setting via web interface and manually changed IP on my ddns account to check update:

IP address source: custom
Network: mob1s1a1

Now I correctly see public (mobile) IP address on DDNS page but now status SMS gives me a 192.168.1.101 WAN IP:

text |Router name - RUT240; WAN IP - 192.168.1.101; Data Connection state - Connected; Connection type - HSDPA and HSUPA; Signal Strength - -97; New FW available - No;|


As last step I tried to bridge WAN to BR-LAN and now it seems to correctly work:
RUT240; WAN IP - 2.7.14.54