Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have Ubuntu 11.04 Natty and I'm using the bind9 service.
I have it configured like this:
$TTL 86400
example.com. IN SOA ns1.example.com. root.example.com. (2012111201 10800 3600 604800 86400)
example.com. IN NS ns1.example.com.
example.com. IN NS ns2.example.com.
ns1.example.com. IN A 55.55.44.44
ns2.example.com. IN A 44.44.55.55
example.com. IN A 55.55.44.44
*.example.com. IN CNAME example.com.
Now, all of my subdomains point to my main domain's IP, the first NS (55.55.44.44)
What I'm trying to do is have a subdomain point to another IP if the port is changed.
For example:
test.example.com on port 80 would point to 55.55.44.44 and test.example.com on port 25565 would point to 33.33.33.33
Further explanation:
I host a website on test.example.com on port 80, on the same server where the bind9 service is. But if you would save test.example.com in Minecraft it has to point to 33.33.33.33:25565.
So:
test.example.com:80 -> 55.55.44.44:80
test.example.com:25565 -> 33.33.33.33:25565
Is this possible?
Thank you
No. DNS only resolves to the IP address level.
The closest you could get would be the configure the machine the DNS resolves to to perform port forwarding.
No, this is not possible. DNS has no knowledge of ports.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I have Mikrotik router board,
I want to forward all site request to an IP address of specific site, in some hours of day
For example a.com forward to 188.158.x.x
Can any one help me?
using web proxy to forward http request to web proxy server Address
/ip proxy
set cache-administrator="Mehdi Haghshenas" enabled=yes max-cache-size=none \
parent-proxy=0.0.0.0
/ip proxy access
add action=deny dst-address=!x.x.x.x redirect-to=x.x.x.x
x.x.x.x is the server want to forward to
then you must add nat to forward http request to proxy server using
/ip firewall nat
add action=redirect chain=dstnat disabled=yes dst-address-list=!LocalIP dst-port=\
80 protocol=tcp src-address-list=LocalIP to-ports=8080
/ip firewall address-list
add address=192.168.0.0/24 list=LocalIP
add address=192.168.1.0/24 list=LocalIP
Just write a script which redirect all HTTP traffics to specific IP address and use routerOS scheduler to execute this rule in a specific time of the day/night, then write another script to remove that rule in another time. If you need sample just tell.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I want to run a web server on my home network but my ISP doesn't let incoming requests from port 80, so I have to use port 81, is there a way I could hide the port number from my domain so that people don't have to type mysite.com:81 in the address bar?
I tried to use an SRV record but after failing so many times I realized that the browser needs to obey the SRV record and it doesn't so that's why it doesn't work.
Note
My ISP also wouldn't let me buy a static IP so I have to use a dynamic dns service provided by noip.com.
If your ISP blocks port 80, then you can't run anything, not even a port forwarder, on port 80. Which means your visitors will need to use the port number. Period. Sorry, but there's just no way to make the browser use a different port without telling it to.
One thing that some dyndns providers allow you to do is to create a page that's shown when the domain is offline. You could get jordanjones.noip.com and realjordanjones.noip.com, set jordanjones.noip.com to offline, and make a page there that's nothing but a frameset with one big frame that pulls in realjordanjones.com:81. Don't know if noip.com offers that service, though.
The only real answer is: get a decent provider.
You need to do either port forwarding or redirect requests on server.
For example run server on 8080 port and redirect all requests from port 80 to 8080.
See this: Apache VirtualHost: How to ServerName a port different from 80
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have just set up a WAMP 2.2 localhost on my computer. I have everything running properly (I can execute PHP, MYSQL, etc...) and am now wondering how I would point my localhost to a public ip-address that could be accessed outside of my network. Is this possible? If so, how would I do that?Thanks!
EDIT:
Specs: windows, wamp 2.2.... Needed just to serve MYSQL and MYSQLI databases, php, html, js, and css files to people outside of my network. I prett much want ot create a basic website with my localhost.
Have a look at localtunnel. Very handy for services that callback to your server (like paypal etc).
For alternatives on windows there is discussion here.
Finally you could forward a port back to your internal machine and use service like dyndns.
I couldn't tell you the best one to use without knowing more about your specific needs.
EDIT: Upon seeing what you really want to do, I would suggest forwarding a port on your router back to your webserver. There is a simple guide here that you should be able to figure out how to apply to your situation. Then you want to use something like dyndns as mentioned to register your own IP address to a name out onto the web.
Apache is most likely bound to 0.0.0.0 (all IPs of system) and your VirtualHost probably uses a name-based (not IP-based) set up, and does not restrict the localhost VirtualHost to 127.0.0.1 (I'm more familiar with Wamp-Developer Pro than with WampServer, but I'd be surprised otherwise).
So any request that reaches Apache will end up at the VirtualHost that matches the domain-name under it's ServerName or ServerAlias directive, or will return the default VirtualHost.
You'll need to 1) unblock incomming port 80 and 443 in Windows Firewall, 2) port-forward Router WAN 80 and 443 to LAN IP, and 3) hope that your ISP does not block incomming port 80 requests.
You'll also need to use a registered domain-name, and will need to set it's DNS to point to your public IP address (which will be the Router's IP). Or transfer the domain-name's DNS to a Dynamic DNS service's nameservers ... that will sync the domain-name to the changing public IP address.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a webpage for the teachers at the school, and it's found on localhost. (192.168.1.1)
I can reach that page out of school also. (example.com)
I want to solve the following: If they at the school and want to open example.com, don't have to go to the internet and back to the school with the request.
I want to host all example.com requests to 192.168.1.1 at the inner server. And if someone called example.com at the school, it would be over LAN and if out of school, it would be over Internet.
You can choose between (I would rather the second one):
1) Modify the "hosts" file in each machine (by hand) to force example.com to 192.168.1.1 (it is hard)
You can find this file:
Windows: %SystemRoot%\system32\drivers\etc\hosts (by default the system root is c:\windows, so if you are using Windows, your hosts file is most probably c:\windows\system32\drivers\etc\hosts)
Linux: /etc/hosts
Mac OS X: /private/etc/hosts
2) Set up a transparent proxy at school, so all requests will go through this proxy, and you will only have to add this rule in your new proxy machine.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am setting up multiple sites on IIS7.
What are the pros and cons of:
Setting up all the sites on the same IP address but different ports
versus
Setting up all the sites on different IP addresses.
Also,what are the implications for SSL certificates(any any other aspects that you may know of) between the above two approaches?
First, each site that uses SSL, must be bound to an IP address. SSL sites can only be segmented by IP (and port) and cannot be segmented by host name.
The only implication by segmenting by host is that if a given site goes down (literally stopped) and if there is a site listening only on IP, it will "choose" that site. So, the effect is a user goes to site A and sees the stuff from site B. If all sites segment on host, this isn't a problem.
For public sites that assume 80 and 443 for http and https, you really can only segment on IP or host. Most users will not be expecting to navigate to something on a different port and you would need to open special ports on the hosting system's firewall to allow for requests on those ports.