New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Add DNS record to forward test.domain.com to ip:port/folder/ ?
Suppose I have an URL which is like this: ip:port/folder/ and have a domain like this: domain.com
How can I create a DNS record which makes test.domain.com forward to ip:port/folder ?
Note that I only have access to the DNS records (Cloudflare). CNAME isn't an option since doesn't allow ports.
Comments
I don't think that is possible. But you could try creating an Apache virtual host or whatever to listen for that DNS hostname and redirect to your ip:port/directory
Sadly I don't have apache running. It's for Plex Media Server. It runs on ip:port/folder e.g. 127.0.0.1:32400/manage
Some DNS providers (I know ClouDNS does) let you set up "web redirect" records on a domain, but I'm not sure if CloudFlare does.
Nginx reverse proxy is your best bet, using pure DNS is impossible.
Sounds like a mod_rewrite job to me.
+1 for mod_rewrite - proxying would be a waste of resources
Unless it only listens on localhost...
I believe you can add domain redirect rules or page rules for domains via Cloudflare.
iirc poweradmin dns service offers this (the service not the open-source dns app)
http://blog.cloudflare.com/introducing-pagerules-url-forwarding
Something like this. Not sure if this would be of help to you. Give it a try.
set aname to test.domain.com then ip of apache server. from apache set vhost to folder then redirect apache port to the said port.
install apache on your pc then have iptables forward it to your plex media server.
Cannot be done using just DNS; it knows nothing about ports. You can either have a web redirect or a proxy to accomplish this, depending on your needs.
I use nginx on a LEB for this. This was the easiest(laziest) way I could find. Basically just install nginx, point your A record to the box and shove the following into sites-enabled.
server {
listen 80;
server_name poop.example.com;
rewrite ^ https://what.you.want:6090/ permanent;
}
@herbyscrub
That's a redirect, not a transparent way of doing it...
I was talking about the nginx reverse proxy functionality
I was talking about the nginx reverse proxy functionality
I was not referring to anything you mentioned. He asked for a way to forward and never mentioned transparency as a requirement.
Many NAT devices can forward port x to port y
This might be a quick and dirty method as @BronzeByte described but I think I am going by this approac. I already have a LEB running Nginx which is pointed to that domain using an A record so it should be easy peasy to setup. I'll let you know if it worked out.
Thanks!
Apparently I'm running Lighttpd on that box instead of Nginx, no idea why I did that.
Does lighttpd support this as well?