Hi
Total newbie. First time with openwrt and first time playing around with hostnames =)
I would like to access my gitlabserver by hostname.
This is only to be called inside my home network.
I did check some other posts, but they where not detailed enough.
Sorry if I missed some obvious tutorial/information somewhere.
And sorry for the weird url:s. Cannot post more than 2.
At the static leases I have
Hostname: gitlab.internal.com (temporarily made up name)
MAC-Address: 52:xx:xx:xx:xx:xx (gitlab.internal.com.lan) (I picked item in dropdownlist)
IPv4-Address: 192.168.1.121 (I picked the one already assigned. Should it be outside of dhcp range?)
Lease time: [Empty]
DUID: [Some value from dropdownlist]
IPv6: [Empty]
And then save & apply, no reboot.
I fire up mobaXterm and try to ssh to gitlab. internal. com. Does not work.
Then I try gitlab. internal. com. lan and that works.
When I browse to gitlab gui by IP, it works.
But if I try http : // gitlabrunner . internal . com/, I get 4100 dropped
and if I try with .lan at the end of the url - I get cannot display webpage
I have not set static IP on the gitlabserver.
I want to access my gitlabserver (both ssh and browser), by gitlab.internal.com.
Can you see what did I do wrong, or what have I misunderstood?
Using version: 18.06.4
He doesn't say that.
He says that gitlab.internal.com doesn't work but gitlab.internal.com**.lan** works, which is expected.
And your suggestion will have the same result, as OpenWrt by default adds the .lan domain suffix.
@trendy
"Go to Network -> Hostnames and add the name and the IP." + add static ip on server.
What if the router is restarted and assigns a new IP?
Then you suggest static dhcp lease.
That is the one Im trying to get to work.
Please let me know if I misunderstood.
@lleachii
This what /etc/config/dhcp looks like (no changes made)
config host
option name 'gitlab.internal.com'
option dns '1'
option mac '52:xx:xx:xx:xx:xx'
option ip '192.168.1.121'
option duid '[some id]'
It looks like your suggestion.
Of course I could try and add stuff here: /etc/config/dhcp
But, I still do not understand what I did wrong.
If you have it configured and saved the configuration, it will not change. If on the other hand this server is so important, configure it with static IP, outside of the DHCP pool or at least create an entry in DHCP to make sure that no other host will be assigned this IP.
Sorry for the delay.
I tried the easy way: "Network -> Hostnames and add the name and the IP."
At a first glance it seems to work exactly as I want it.
I will play around with this and see if it works in the long run.
It seems that it will based on your comments.
I will make a deeper dive into this if I find later on that it does'nt work when assigning IP:s etc.