SQL Reporting services external NAT - sql

I have a Reporting services URL accessible internally on a Server. I want to expose this to a user who is not on the same network - but can access the network via a firewall.... the RS instance is thus setup with SSL etc.
The server is already running one SSL site - so we have used a different port number.. eg. 446 for the RS site.
So internally the URL is as :
http://server:446/Reports_Test and this works as expected.
Externally we NAT 443 on a specific name to 446 intenally
So externally I ask for (via https)
reporting.example.com/Reports_Test
I get the login prompt as expected... but then once successful... the site redirects to (via HTTPS)
reporting.example.com:446/Reports_Test
Is there a way to stop the RS changing the port number ?

Use the Reporting Services Configuration tool to configure the URLs.
To set advanced properties on a URL:
On either the Web Service URL or Web Portal URL page, click Advanced.
Click Add.
Click IP Address or Host Header Name. If you specify a host header, be sure to specify a name that the DNS service can resolve. If you are specifying publicly available domain name, include the whole URL, including http://www.
Specify the port. If you specify a custom port, the URL to the application must always include the port number.
Click OK.
Test the URL by opening a browser window and entering the URL.
From:
https://msdn.microsoft.com/en-us/library/bb630447.aspx

Related

can i use my device name and IIS host number instead of IPv4 and IIS host number for api calls?

Currently I am using my ip and IIS host number for api calls.
For example, I use [https://192.168.1.27:100/api/values ]
where 192.168.1.27 is my ip and :100 is the host number in IIS
Now, instead of my ip "192.168.1.27" , I want to use my device name which is "DEVELOPER-1". Is that possible? If yes, how may i do that?
In the IIS manager, right-click on a website, and then click Edit Bindings.
In the Site Bindings window, click Add.
In the Add Site Binding window, enter the hostname as "DEVELOPER-1".
Now, if you want to use "https://DEVELOPER-1:100" instead of the "https://192.168.1.27:100". For this, you have to open the hosts file located in the C:\Windows\System32\drivers\etc, Add "192.168.1.27 DEVELOPER-1" at the end of the file. This will tell IIS to search for the website when https://DEVELOPER-1 url is entered.

Browser displays IP rather than name

I just built a web page and made it live. The web page was previously accessible by its IP address. I then went to godaddy and made a domain name forward to the IP. The problem is that once I get to the page, the web browser displays the IP rather than the domain name. The customer wants the domain name to display on the page along with the page itself. Most companies want their .com name on the browser bar.
Example: On this page, my browser displays stackoverflow.com/question/ask rather than the Server's ip address.
The web page is served by apache and the server OS is a Bitnami LAMP server.
Any advice? And what else should I do to register and make a domain name function properly?
You need to set up A records, not forwarding records. You can find GoDaddy's help on the subject here: http://help.godaddy.com/article/680#arecs
I had a similar issue. To resolve I had to go to "DNS Management" where "A" was marked as "#" and "Forwarded" (if not change it) then below there is a "Forwarding" section where if you click on the pencil it allows you to enter the data:
Forward To: "http://1.1.1.1" (your IP where you forward to)
Forward Type: Permanent(301)
Settings: HERE WAS MY PROBLEM: it was set as "Forward Only" and I changed it to "Forward with masking" and that fixed the issue

Web-page redirection

I am trying to achieve the following:
when a user types "print" (or "http://print") in the address-bar of the browser :
I want the user to be re-directed to a page : www.abc.com/print/
How can one achieve this ? I tried to lookup some squid configurations but was unable to find the same.
Thanks!
Edit : I do not understand the deal with down votes, this is a perfectly valid question.
If you want to enable a user on your LAN to type "print" in the address bar and be redirected to a given hostname, you'll have to supply a DNS record to that effect. This is not accomplished on a web server, nor is it web development in any respect.
There are several methods to resolving a given hostname to a given IP or to another hostname. One way is to edit the client hosts file, as described in another answer. One could also, if you have a DNS server running within your LAN environment, add A records to this effect.
You must understand how hostname lookups work from a browser. When you type something in the address bar, your browser uses your operating system to resolve the hostname to an IP address. Your operating system uses its hosts file, internet connection, and other mechanisms to accomplish this. This process itself has several tiers and steps that are outside the scope of the browser and which cannot be influenced by the browser. Nor will arbitrary web servers be consulted in this process. Your aim is to inject something in this process that resolves the hostname "print" to the webserver of your choosing - THEN web development might come in to play.
See: http://www.quackit.com/how-websites-work/how-dns-works.cfm

Browsing sites with their domain name from the same server they are hosted on

I have a co-located webserver(Win2k8) having a public IP and have hosted my ASP.NET website on the IIS. Though, I am able to browse everything else from the local browser(IE) installed on the server, the server somehow fails to browse the websites that are hosted in its own IIS when I access them using their 'domain name' set as a host header. For e.g: If the website is for "www.mywebsite.com", so naturally I have set the Host header property to "www.mywebsite.com" and when I put "www.mywebsite.com" in my IE address bar it fails to get the request.
Ok, so now why I need to access this website is that, I plan to send a Query parameter to one of the pages from another page of the same website.
Any idea how to get this working? Thanks in advance folks.
It may be trying to reach itself via its public IP address, which it may not be able to route to.
You can try adding a line into your hosts file (C:\Windows\System32\Drivers\Etc\Hosts, or equivalent) as follows:
127.0.0.1 www.mywebsite.com
Which will force it to access it via the loopback adapter.

How to prevent hackers from exploiting Apache ->Sites-available -> Default file

We noticed that a hacker created a domain and configured DNS to point it to our server's IP address.
We are using apache2.x on Ubuntu.
There is a "default" file in apache's /etc/apache2/sites-available directory and it looks like the the hacker's domain is using "default" apache configuration file to display our web content in their domain.
How can we prevent this?
Can some one post a "default" apache configuration file as an example?
Unknown domains that come into apache over the specified ip and port will be directed to the first virtual host, thus the 000-default file. Your best bet is to make the 000-default host return a 400 or 500 error (or some explicit message saying the domain doesn't belong) and use explicit virtualhosts for each of your sites.
+1 Jeremy's answer: make the default (first) virtual host for each IP address you're listening on return something useless like a 404 or page saying nothing but “this is a virtual server”.
Allowing your web server to serve a real web site on a non-matching ‘Host’-name (including a raw IP address) opens you up to two particular attacks:
DNS rebinding attacks, leading to cross-site scripting into your real web site.
This affects sites with a user access element (eg. logging in, cookies, supposedly-private intranet apps).
‘Search-hijacking’. This affects all sites (even completely static ones). This may be what is happening to you. By pointing their own domain name at your server, they can make search engines see both the real domain name and their fake one as duplicates for the same site. By using SEO techniques they can then try to make their fake address seem like the more popular, at which point the search engines see that as the canonical address for the site, and will start linking to it exclusively instead of yours.
Most web servers are configured by default to serve a web site to all-comers, regardless of what hostname or IP address they're accessing it through. This is a dangerous mistake. For all real live sites, configure it to require that the ‘Host’ header matches your real canonical hostname.