# Hostnames setup for same ip, different ports

**URL:** <https://forum.openwrt.org/t/hostnames-setup-for-same-ip-different-ports/60902>\
**Category:** Installing and Using OpenWrt\
**Created:** [April 17, 2020, 11:11am UTC](https://forum.openwrt.org/t/hostnames-setup-for-same-ip-different-ports/60902 "2020-04-17T11:11:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paolo177](https://forum.openwrt.org/letter_avatar/paolo177/32/5_5575768a8748004e209b776fc1b2916d.png) [@Paolo177](https://forum.openwrt.org/u/Paolo177)\
**Post date:** [April 17, 2020, 11:11am UTC](https://forum.openwrt.org/t/hostnames-setup-for-same-ip-different-ports/60902/1 "2020-04-17T11:11:57Z")

</div>

I have a FreeNAS server in my house in LAN it has 2 different running HTML GUI interfaces they are running on different ports: 192.168.1.5:9090 and 192.168.1.5:3003.

I would like to create hostnames on my openwrt so I can just type the name and go to the GUI I need. For what I read this isn't possible, right? But I'm a little newbie so maybe some of you can say more 🙂

Thank you!

---

<div class="post-metadata">

**Author:** ![Sparks](https://forum.openwrt.org/user_avatar/forum.openwrt.org/sparks/32/8563_2.png) [@Sparks](https://forum.openwrt.org/u/Sparks)\
**Post date:** [April 17, 2020, 11:29am UTC](https://forum.openwrt.org/t/hostnames-setup-for-same-ip-different-ports/60902/2 "2020-04-17T11:29:33Z")

</div>

It might not be exactly what you’re after but you should be able to give it alias host name in dns , then rely on your browser’s url autocompletion to take you to the port you need once you’ve accessed both of them once.

---

<div class="post-metadata">

**Author:** ![trendy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trendy/32/8800_2.png) [@trendy](https://forum.openwrt.org/u/trendy)\
**Post date:** [April 17, 2020, 11:38am UTC](https://forum.openwrt.org/t/hostnames-setup-for-same-ip-different-ports/60902/3 "2020-04-17T11:38:53Z")

</div>

It is not easy but it is possible. You need an http server to rewrite the port, like a proxy.

---

<div class="post-metadata">

**Author:** ![Paolo177](https://forum.openwrt.org/letter_avatar/paolo177/32/5_5575768a8748004e209b776fc1b2916d.png) [@Paolo177](https://forum.openwrt.org/u/Paolo177)\
**Post date:** [April 18, 2020, 1:12pm UTC](https://forum.openwrt.org/t/hostnames-setup-for-same-ip-different-ports/60902/4 "2020-04-18T13:12:29Z")

</div>

I digged a bit on my own and I found [this](https://openwrt.org/docs/guide-user/base-system/dhcp_configuration). I think it is exactly what I'm trying to do under the SRV RR section.

I tried a bit on my router but it desnt seem to work ☹, what am I doing wrong?

I have this configs: ![image](https://forum.openwrt.org/uploads/default/original/3X/6/4/644317434e0fe5d1f27a33503a591e35793014ce.png)

---

<div class="post-metadata">

**Author:** ![trendy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trendy/32/8800_2.png) [@trendy](https://forum.openwrt.org/u/trendy)\
**Post date:** [April 18, 2020, 2:44pm UTC](https://forum.openwrt.org/t/hostnames-setup-for-same-ip-different-ports/60902/5 "2020-04-18T14:44:37Z")

</div>

Unless this is a sip server, it won't work like this.

---

<div class="post-metadata">

**Author:** ![Paolo177](https://forum.openwrt.org/letter_avatar/paolo177/32/5_5575768a8748004e209b776fc1b2916d.png) [@Paolo177](https://forum.openwrt.org/u/Paolo177)\
**Post date:** [April 18, 2020, 4:42pm UTC](https://forum.openwrt.org/t/hostnames-setup-for-same-ip-different-ports/60902/6 "2020-04-18T16:42:30Z")

</div>

yeah and it didn't, after that I tried also simply removing \_sip ![image](https://forum.openwrt.org/uploads/default/original/3X/3/0/30158a91e0a55139ec40acb0c7c8b94dc9b0e99f.png)  
It didn't work either.

But in general am I in the right config spot for what I'm trying to do?

---

<div class="post-metadata">

**Author:** ![trendy](https://forum.openwrt.org/user_avatar/forum.openwrt.org/trendy/32/8800_2.png) [@trendy](https://forum.openwrt.org/u/trendy)\
**Post date:** [April 18, 2020, 4:53pm UTC](https://forum.openwrt.org/t/hostnames-setup-for-same-ip-different-ports/60902/7 "2020-04-18T16:53:15Z")

</div>

[Not really](https://community.spiceworks.com/topic/1688486-dns-svr-records-for-custom-http-https-port).
