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
1,036 views 9 comments
by anonymous
Hello,

i would to forward a hostname into a LAN ip. I am trying to do this with the menu "DNS forwarding".

I want that when inside the LAN if i put "ha.giovane" on browser it will redirect to "12.12.0.13" ip.

But anything i try to configure in this menu (see fig.2), will bring my network into not working (no more dhcp valid for any device) and lan interface broke down.

How this: https://wiki.teltonika-networks.com/view/RUT955_DNS

really work for solve my issue?

Many thanks

1 Answer

0 votes
by anonymous
Hi,

Please describe in more detail the topology of your network.

In order to get a bundle of a local ip address and a domain name, you need to configure a local DNS server or a "hosts" file.

Regards
by anonymous
Hello

The LAN Is very simply as in fig1.

Gateway Is the rut955 with ip 12.12.0.1 , subnet 24, Dhcp Is the rut955, there Is not a DNS server dedicated in this LAN, via Dhcp i put 8.8.8.8 and 8.8.4.4 on the connected client.

 There Is a SIM card on board, everything works fine.

I have also tryed to make rut955 DNS server (put 12.12.0.1 insted of 8.8.8.8) on Dhcp option. It works and Is passed to clients. But still DNS forwarding(fig 2) not work.

If It Is more Simple...how to do a hosts file? This tolopogy Is enough?

Thanks
by anonymous

In order to get the result, you need to add a line to the router's hosts file after "127.0.0.1 localhost":

12.12.0.13 ha.giovane

and reboot the device.

DNS forwarding forwards DNS requests of set hostname to particular DNS server on set IP not redirects traffic from set hostname to set ip.

by anonymous
I try to find hosts file. But it is not present.

I found only a folder named hosts (fig3). Inside it there is ona file "dhcp.cfg01411c". (fig4)

I try to add the row as suggested on it(i don't know if it is right) but after rebbot my new row is disappeared.

Sorry for sure where is located the right hosts file to modify?

Thank you
by anonymous

the file is located at the path /etc/hosts
1. Connect to the device via SSH
2. Enter vi /etc/hosts
3. Click "insert" to edit, after 127.0.0.1 localhost add 12.12.0.13 ha.giovane
4. Press Esc to exit the editing mode. To save, enter :w, confirm the file name. To exit, enter :q.
5. To view the contents of the file, enter cat /etc/hosts. If the contents of the file suit you, then enter reboot

Regards

by anonymous
Thank for your time,

i found hosts file and modify as you suggested. Then rebotted. I verify also and it keeps all.

Now i try to reach "ha.giovane" from a netbook client connected on the lan, but it cannot solve to ip 12.12.0.13 if i put "ha.giovane".

Off course If i put direct the ip it works. See fig.6 please. (Sorry it is italian but i hop it can be understand)

Let me know please your consideration. Thanks
by anonymous

this is fig6 i want show you

by anonymous
I think i found. It works only if i put as DNS server for the client, the 12.12.0.1 via Dhcp.

Thanks for help me solve this low profile networking issue, hope this  tread could be usefull also to others geeks
by anonymous
yosha is right

you also need to use the ip of your rut955 as a DNS server (put 12.12.0.1 instead of 8.8.8.8) on clients by hand or via DHCP.
by anonymous
But through modifying hosts file, it can not resolve host from outside devices connected to Wifi.