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
689 views 3 comments
by anonymous
RUTX / RUTX_R_00.02.01.1  

Looking at admin/status/realtime/connections, the source and destination IP addresses are generally resolved to hostnames, including the local LAN/DHCP clients into deviceHostName.lan

However the modem IP itself is not resolved, even though the admin/system/admin Device Name and Hostname is configured. This seems to only apply to 192.168.1.1.

How to make the Mobile/WAN IP also get a name to make it easier to read (particularly as it's usually changing across reboot/restart), alongside the many other incoming/outgoing connections?

Perhaps /etc/hosts could have a name for it but how to make it automatically do so when IP changes?

I manually updated /etc/hosts with the current IP but refreshing the connections page still shows just the mobile IP.

1 Answer

0 votes
by anonymous

Hello!

You can change the LAN IP hostname for local purposes, as you said, in the System → Administration → General page. (Second field from the top).

There is no possibility for WAN IP to obtain a hostname for local purposes.

For remote access you would need to use a third-party DDNS service. For extra info you can refer to these configuration examples or the DDNS manual page.

Best regards, Aliaksandr!

by anonymous
Just like there are device.lan hostnames under lan domain, is there no way to make a custom .wan domain for the modem's 10.x.x.x IP? It's not a public IP anyway, and only want it to have a name in the connections list for readability.
by anonymous

This worked:

Update /etc/hosts with new line

10.137.110.241 rutx-wan

Then run

/etc/init.d/dnsmasq restart

Now Realtime Connections page shows rutx-wan.lan instead of IP.

NETWORK PROTOCOL SOURCE DESTINATION TRANSFER

IPV4 TCP rutx-wan.lan:42262 ec2-18-196-62-30.eu-central-1.compute.amazonaws.com:15010 4.18 MB (7945 Pkts.)

Separately have rutx.lan based on the System > Administration > Hostname being "rutx

root@RUTX:~# nslookup rutx.lan

Server: 127.0.0.1

Address: 127.0.0.1#53

Name:      rutx.lan

Address 1: 192.168.1.1

Address 2: fda8:7132:98c8::1

root@RUTX:~# ping -c1 rutx.lan

PING rutx.lan (192.168.1.1): 56 data bytes

64 bytes from 192.168.1.1: seq=0 ttl=64 time=0.328 ms

--- rutx.lan ping statistics ---

1 packets transmitted, 1 packets received, 0% packet loss

round-trip min/avg/max = 0.328/0.328/0.328 ms

So now the question is how to make this automatic for any WAN assigned router IP? Maybe some tricks with /etc/dnsmasq.conf.

by anonymous

Hello!

It seems to me that you need to read the articles at the link below:

https://openwrt.org/docs/guide-user/base-system/dhcp

https://openwrt.org/docs/guide-user/base-system/dhcp.dnsmasq

https://wiki.archlinux.org/index.php/dnsmasq

It describes configuration options, as well as pay attention to the add_wan_fqdn command. Perhaps this is what you are looking for.

Regards, Aliaksandr!