Protect home (webserver's) dynamic ip from reverse DNS issue - apache

this is my first question here =)
I'm setting my webserver at home (trying both apache and nginx) and I've found that you can easily get and use free dynamic dns (sub) domain to make your server available not only with your home ip that would be changed next time after disconnect and connect to the internet. Actually I've made it working and it's great..
But the problem is that my personal unique data (account id/machine name) could be retrieved with reverse dns look up and I can not hide my real ip that is attached to server.
You can use proxy while browsing the internet, but how to proxy your web server (apache) that have free dyn dns (sub) domain?
I've already tried to create VirtualHost configurations, also with the use of proxy modules (mod_proxy, mod_proxy_http, mod_proxy_html) and additionally with proxifier tool, but no luck.
Some people say that it is possible to hide ip with nginx, but I never used to work with nginx. Still believe it is also possible with Apache, just can't figure it out.
I'm using private proxy in format [proxyip:port]. I must attach it everytime to my home ip to make it work. Maybe it's better to get login/password auth proxy, but at first I should find the way how to use it with web server.
Is there anyone who have luck with it? Can you explain, please, the proper config for apache? Currently I'm using version 2.4.
Many thanks and have a good day!

Related

GCP Compute Engine Hosting Two HTTPS Website

I have a Windows instance from GCP Compute Engine. I have a website on the server using IIS, for a time. It is perfectly working with SSL certificate.
Yet, now we want to host another website on the server. I had opened the website yesterday, all the DNS's are configured and it is also working
well expect it has a HTTPS connection. I bought a SSL certificate and it is issued and ready for use. However, I forget that IIS works with SSL's in a way that the most recent SSL is accepted for specific IP and all the websites would start consuming that, the newest, one. That is why I was trying to obtain new IP but could not figure it out. Then I simply tried traditional way to have a new IP and wanted to assign to new site. Then on IPv4 configurations, it says 'DHCP Enabled'. So I stuck there and could not go to the next steps.
GCP have really complicated documentations on this issue none was really clearly expressing it. I found some solutions like I might start with enabling IP Forwarding yet I also could not find on documentations how to do it.
In short, I had a website with SSL and I have opened a new website on the same machine. Of course, their IP's are same so I would like to be able to obtain a new IP without changing the previous site's IP. I just did not know and could not find how to do it.
I would be appreciated if someone can help me to figure out how to obtain new IP for the new site so that I can use my issued SSL certificate for the website.
Thanks!
It is not directly possible to assign more than 1 IP per VM. However, you can have any number of external IP addresses by referencing the instance through forwarding rules and target pools, which is explained in this document.
You may also work out this without lb but only with forwarding rule / Protocol Forwarding. More about the concept is discussed here

IIS 8 (Server 2012) Site Binding Not Working Works When No Site Name Is Specified

I've run into a strange problem. If I put a site name in the site bindings, the Default Web Site on ISS is not recognizing it. Suppose I leave it blank, then I'm able to get the pages but they show up with the server IP address.
This is a problem because with SSL, it will either not serve pages or it will give me a site warning.
Note that I have the DNS working of GoDaddy with forwarding and masking to the public IP of my EC2 instance on AWS.
All of this started overnight when the SSL cert expired. I have since put a new certificate that's valid but I cannot get the site working again.
I've done a lot of debugging including diffing the old configuration that was working with the new one and I'm not able to understand why this happens.
Setting the site name causes both http and https to not work.
Much appreciate any help in solving this - Thanks in advance!
This appears to be a problem with masking with forwarding provided by the domain host Go-Daddy. For some reason, with masking with forwarding, the response is enclosed in a frame and that frame says the src is the public IP address of the server rather than the domain name.
I also think that there is a problem with https forwarding with masking. While the reason this problem happened is not clear, for now, the fix has been to change the domain from masking with forwarding for http requests alone to point at the http server public IP address.
This is not the ideal solution but at least has the website back up and running. I'll post an update once I know more about masking with forwarding and why that suddenly stopped working.

is setting tomcat application url to http:// hostname/application/ possible?

I have a setup, with tomcat running on port 8080 and apache webserver running on port 80.
So if I access http://localhost:8080/myapplication/ , it works.
But I need to be able to make it like : http://localhost/application/, but since my http web server runs on port 80, it seems that i need some re-direction logic or changes at the tomcat to achieve this.
Can anyone please suggest i way out. Thanks.
UPDATE:
Just found that there is already a solution provided here: How do I redirect from Apache to Tomcat?
You need to look at the Tomcat-Apache HOWTO.
It is entirely possible and in fact quite common for apache and tomcat to be used in combination by the tactics described in this page.
And this question really probably belongs on serverfault...
Since you mentioned about "users", I am guessing you are implying "hostname", when you mention "localhost". If you have a Load Balancer and a user friendly DNS name that you would give to the users, you can configure your Load Balancer software to route all requests to "hostnameyougavetotheUsers" to "yourinternalhostname:8080".

Redirecting web traffic in a server hosting both an Apache and a Glassfish web

I am hosting two web pages in my server. One is running on Apache and the another one on Glassfish. By now I solve the redirection problem making the Glassfish server to listen on a port distinct than the 80. The problem is that I think my web users have a firewall blocking those ports so they can´t access the GlassFish web. Which way would you recommend me to take in order to make a URL request-based redirection? I want to make the glassfish web a subdomain of the Apache one, being both running at the same IP.
If I have not been sufficiently clear with my question, please let me know
Thank you for your time.
Have you tried modifying the domain or using subdomains? If one application is eg. at http://subdomain1.yourdomain.net and another at http://subdomain2.yourdomain.net it should do the trick without any problems. Or try http://yourdomain.net for your main program and http://yourdomain.net/somecontext for sub program. That looks meaningful also for the service user.
Tick the answer if you got help :)

Dynamic DNS on your own server

I have a server in at a hoster (which has a static IP) and want to run a server at home too and don't want to buy the dyndns package from dyndns.com
I would either like to find a program that does this without costing money and using my own server and domain so I can have myclient.domain.com or I would like to write this myself. Would I be able to do that with a custom apache conf?
EDIT:
I have 1 Server with a static ip and I want to run a server at home (dynamic IP) I want to use the server with the static ip to run as the dyndns managing server
I use zoneedit.com for my DNS servers, and they have a free dynamic service that works fine for my home box. (On the other hand, my home box changes IP about twice a year, so it's not like I stress it.)
On my home box, I have a script that polls a tiny little cgi on my colo box to return what my current IP is (because I can't get it from the router), and if it's changed, it does a "curl" to update my zoneedit settings. When I get home, I'll try to remember to post the script.
Per your revisions: Ah, then you can theoretically do that, yes. (As noted elsewhere, apache.conf is irrelevant.) Your hosted server needs to be the nameserver of record for your dynamic DNS; you should probably use a subdomain. This would be a record in your main domain's zone file of IN NS server.ip.number.here. Then you configure a DNS server on your hosted server for the dynamic namespace; you'll have to get deep into the configuration to set up the records so that they advise client nameservers not to cache them, or to cache them only very briefly. Then you write some sort of systemry where the home machine, when a connection is established, talks to the hosted server and tells it to change the DNS for the dynamic hostname to point to its currently assigned IP.
You cannot do it with a custom Apache conf. Apache handles web serving, not DNS.
Maybe I´m wrong but I think what you want is:
create a dynamic host in a free DNS service, like dyndns.org (Or you can even manager a entire domain using editdns.com which has dynamic dns also). For example: server-at-home.dyndns.org.
Create a static IP host for the desired address (ex. www2) pointing to the same IP address of the www server.
Create a virtual host in the httpd.conf in the static ip server and put a reverseproxy using the dynamic host create on item 1.
P.S.: You said that the main goal is to void to buy for this service but i use dyndns.com and i dont pay for it. And i have 4 hosts in my account.
I have a server at home with a Static IP address, and I do exactly what you are looking to do with a free dyndns account. I just have to renew it every month or two - they send me an email and I just click the link to let them know I'm still here and alive.
I am not exactly sure, but it sounds like you want to redirect to your "server" at your house from your webserver at the hosted site?
You will need to periodically send some notification to your static IP server to let it know your dynamic ip.
You can do this is some cron/scheduled job - just create a redirect html page every day and ftp it (automagically) to your static ip host.
There are probably other ways to do this. But that should work.