Jump to content
RESET Forums (homeservershow.com)
Gunnm19

Internal DNS

Recommended Posts

Gunnm19

Hi there,

Since my home environment is growing up I'm facing a brain memory and WAF issue.

 

I have several applications hosted on one virtual server. They can be reached like https://192.1.1.1:8080 for app1 https://192.1.1.1:7898 for app2 and so on.

 

I'd like to build an internal DNS to avoid me and my GF to keep in mind the port number to have something like : https://myserver.home/app1 https://myserver.home/app2.

 

I had a look on BIND, but as far as I know about DNS, only SRV record manage port and the common web browser are not able to manage them.

 

I had a look on VHOST with Apache, but I think it's not the solution and it won't work.

 

 

What are you doing into your environment to solve this kind of issue?

 

Thank you all!

 

Greg

Share this post


Link to post
Share on other sites
itGeeks

First thing I noticed with your question is the subnet your using, Y are you using a none standard subnet? 192.1.1.1 is not a legal IP address. Have a look below for valid subnets. Also what kind of applications are you trying to host on your VM's?

 

Valid subnets https://www.google.com/search?q=what+are+the+3+private+ip+address+ranges&oq=what+are+the+3+private+ip+address+ranges&aqs=chrome..69i57j0.2165j0j8&sourceid=chrome&ie=UTF-8

 

Private networks can use IP addresses anywhere in the following ranges:
192.168.0.0 - 192.168.255.255 (65,536 IP addresses)
172.16.0.0 - 172.31.255.255 (1,048,576 IP addresses)
10.0.0.0 - 10.255.255.255 (16,777,216 IP addresses)

Share this post


Link to post
Share on other sites
snapper

 

What are you doing into your environment to solve this kind of issue?

 

 

Not done this for ages but, I would set up Apache to use mod_rewrite and implement URL rewriting. See http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

 

You probably want something like this running on a standard Apache instance listening on port 80:

 

RewriteEngine on

RedirectMatch ^/app1 http://myserver.home:8080

RedirectMatch ^/app2 http://myserver.home:7898

 

(untested, just from memory  :ph34r: )

 

 

 

192.1.1.1 is not a legal IP address. 

 

 

 

The IP address is legal, but I think you mean in the context of a private network.

 

Your IP addressing scheme will work fine until you want to access a website that is already using the 192.168.1.0 network. External DNS will resolve the address and then try to connect to a device on your local network, which will then give unexpected results.

 

So whilst it will work, it is recommended to use the range that itGeeks has listed above to avoid conflicts.

Share this post


Link to post
Share on other sites
Gunnm19

My bad, i wrote this post quickly and I didn't think you'd actually care about private/public IP range :) Nevertheless, thank you for this warning, I'm using IPv4 private range at home.

 

Ok I will have a look about URL rewriting, need to build a dedicated lab for this!

 

Greg

Share this post


Link to post
Share on other sites
ShadowPeo

RPROXY could also be another consideration, and I use that (more for external connections than internal) to not only do the URL rewriting but also to secure it with SSL.

 

Works internally and externally the way I have it set up. Another advantage is utilising the RPROXY you can have /app1 and /app2 on the same, or on different servers it does not matter to the reverse proxy.

 

Disadvantage is that it gives you another server to set up an maintain.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...