How can I access simultaneously Synology-DSM of multiple NAS on remote Network with only one browser (Firefox)? - sockets

I have to access simultaneously multiple NAS DSM on a remote Network with Firefox. They are reachable over the Routers-IP and a dedicated port each, like: https:\xxx.xxx.xxx.xxx:5000 and https:\xxx.xxx.xxx.xxx:5100 and https:\xxx.xxx.xxx.xxx:5200. The problem is that Firefox loses the connection to the first NAS as soon as I connect to the next NAS. Multiple simultaneous connections are only possible with multiple browsers, why? How can I manage to connect to all NAS simultaneously, only with one browser?
I found a workaround.
You can start several separate FireFox profiles in such a way that no instance notices something of the other.
To do this, you have to call FireFox with "-p" and create as many profiles as you need:
Standard-User001
Standard-User002
...
And store them in separate folders:
D:\FirefoxProfile\Standard-User001\
D:\FirefoxProfile\Standard-User002\
...
Then you can create links on your desktop:
"C:\Program Files\Mozilla Firefox\Firefox.exe" -p "Standard-User001" -no-remote
"C:\Program Files\Mozilla Firefox\Firefox.exe" -p "Standard-User002" -no-remote
...
Now you have several completely separate FireFox installations.

with Synology NAS, when you login to DSM, the generated PHPSESSID cookie is the same if the domain name is the same, no matter if the specified port in the URL is different. So there is, as far as i know, no way to circumvent this mecanism (needless to say that it is actually a good thing for security in most case).
So the most simple solution i found is to setup CNAMEs on a dynDNS entry, assuming you fullfil the following requirements:
have your own domain name.
each DSM is configured to use a different port.
port forwarding on your router is setup (optional).
Now let's say you have two servers: nas1 reachable on port 5001, nas2 on port 5002 and a dynDNS, for instance nas-is-like.synology.me ( in DSM, check the "DDNS" tab in "External access" settings from the configuration panel if you need to setup this first ).
Then simply add wanted aliases in your DNS zone:
NAME TYPE TARGET
--------------------------------------------------
nas1.youdomain.tk CNAME nas-is-like.synology.me.
nas2.youdomain.tk CNAME nas-is-like.synology.me.
Then you will be able to login on both DSM interfaces ( nas1.youdomain.tk:5001 and nas2.youdomain.tk:5002 ) in the same brower and the same profile.

Related

How can I redirect multiple servers to a single one with ssh?

I would like to redirect multiple servers to a single one.
If a person wants to connect to the servers that are being redirected he needs to use a different port and username like maru#ip.ip.ip.ip -p 9393 for example.
How can I do this?
Thank you.
If you want to make internal servers reacheable from the outside of your network, you want to look into remote port forwarding as described in this link.
You will need to set GatewayPorts to yes in sshd_config and then start the forwarding with ssh -R 9393:<remote ip>:<remote port> on the outside-facing server (there are more advanced configurations to allow only certain clients described in the above link).

Is it possible to expose an Owin service?

We have created self-hosted services using OWIN. They are working fine inside the server and we can request and retrieve information using the http://localhost. We use a different port for each service so that we can go and get certain information from http://localhost:8001, other from http://localhost:8015 and so on.
Now, we need to expose the results of one of those self-hosted services to access to it through internet. We'd like to provide a custom address such http://ourpublicinfo.mydomain.com:8001 or using the server ip such http://209.111.145.73:8001.
Is that possible?
How can we implement it?
Our server OS is Windows Server 2012 R2
OWIN Self-Hosted apps can run on a Windows Service, as a Console process and, with if desired, as part of a more robust Host like IIS.
Since you mention your app is running as a service you're probably missing all the GUI goodies IIS provides. In reality however, IIS works on top of http.sys, just as HttpListener does (which is probably what you're using to self-host your app) 1. You just need to do some manual set up yourself:
First of all, you need to make a URL reservation in order to publish on a nonstandard port.
Why would you do that? Quite simply because you're not running under localhost alone anymore on your very own local machine, where you probably are an admin and/or have special privileges/powers.
Since this is a server, and the user used for running the Service might not be an admin (most probably), then you need to give permission to that user to use that URL... and here is where URL reservations come into scene.
You pretty much have to options:
open up the URL to be used by any user:
netsh http add urlacl url=http://209.111.145.73:8001/ user="everyone" listen=yes
or open up the URL to be used by the user(s) running the service, e.g.: NETWORK SERVICE:
netsh http add urlacl url=http://209.111.145.73:8001/ user="NETWORK SERVICE" listen=yes
There is a way to make the reservation for several users too, using sddl, user groups, etc... but I'll not get into it (you can look that up).
Second of all, you need to open up a hall through your firewall (if you don't have one on this day and age, I pity you!)
There are plenty of tutorials on this. You can use a GUI, netsh.exe and what not.
Pretty much all you need to do is make sure you allow incoming connections through that port and that should do the trick.
To make sure the hall is open through and through you can use a tool like http://www.yougetsignal.com/tools/open-ports/ and insert 209.111.145.73 in the Remote Address and 8001 in the Port Number.
If for some reason it shows that the port is closed, even after creating an incoming rule in your firewall for it, then you probably have one or more firewalls in between your server and the outside world.
With those to elements in place you should be able to access your Self-Hosted Service from the outside.
As for accessing your service through an address like http://ourpublicinfo.mydomain.com:8001, you'll need to create a DNS entry somewhere, most likely on your Domain Registrar for mydomain.com, where you could create an A Record for your ourpublicinfo subdomain pointing to 209.111.145.73.
From this point on, you should be able to access your service through direct IP and Port or through the afore mentioned URL.
Best of luck!
Note:
If your service will be access from other domains, you might need to make sure you have CORS (Cross Origen Resourece Sharing) well defined and working on your service too ;)

Redirect/rewrite to different internal IIS sites using query string

EDIT: Ugh I forgot to put this on Server Fault...
I have an Azure VM that is hosting a web application.
The application will be accessible via the VM's IP address:
http://191.238.112.62
I want to be able to use query strings to redirect to completely different sites that are within the local IIS. For example:
http://191.238.112.62/?site=1
would redirect to
www.site1.com
The way I have structured IIS can be seen below:
Each site has an entry in the systems host file.
127.0.0.1 wwww.site1.com
127.0.0.1 wwww.site2.com
127.0.0.1 wwww.site3.com
There is likely a better way to achieve what I am going for here so any pointers would be greatly appreciated.
Thanks.
Here is how I would do it. Not sure why you want to use query strings for this as IIS is made to do that if you configure it properly.
In your DNS server register all your websites to point to that IP. This is for when you go live. For development the hosts file is a good solution.
When you create the websites add a Host header like below
Now try loading any website by their full name
http://www.site1.com
http://www.site2.com
http://www.site3.com
Here is more info about IIS host headers.
Again, when you go live make sure you have the DNS set up for all the websites to point to the IP address of your server.
Hope this helps.
Edit based on comment:
Right, here is how I solved this in the past.
You can do all this with the hosts file but it's less painful if you have a proper DNS server to resolve the names.
The basic idea is to use slightly different URLs for development on the local machine.
All devs would have site1.com point to the IP of the shared server and site1.com.local point to 127.0.0.1. So a hosts file on a developer machine would look something like:
191.238.112.62 www.site1.com
127.0.0.1 www.site1.com.local
On all development machines you need to make sure you have the .local host header for all sites.
On the shared server you just need to add the right host headers and no hosts file changes. It's actually a bad idea to change the server hosts file.

java.net.BindException when trying to run Jboss on remote system connecting it using RDC

I am trying to run JBoss(5.1) on remote system connecting it using RDC. Which ever port I try, it's says already in use and throwing java.net.BindException Cannot assign requested address: JVM_Bind
I have tried to change the port using jboss service binding configuration located at below path:
jboss\server\Server_Instance\conf\bindingservice.beans\META-INF\bindings-jboss-beans.xml
I have tried various options like ports-01, ports-02 ,ports-03 and then customizing the default port configurations as well with No luck.
I am just wondering how it is possible that it's not allowing any port whichever I try. One thing I would like to let you know here is that the remote system has 3 different logins and all of the users are using the system.
Appreciated if you can provide me any assistance please.
You can pass the -b ${IPofMachine} to bind to an IP. This will also make it externally accessible. You can do 0.0.0.0 which will bind to all available IP's

Viewing a local web site on the LAN under a different hostname

In short I'm trying to browse a Mac's web site on the local wifi network under a .local hostname that is not the same as the machine's 'computer name' and think I'm missing a setup step.
I have a local install of nginx on my Macbook, with the proper /etc/hosts and nginx.conf entries to serve multiple sites, each with their own distinct local hostname. Assume the Macbook's network name is computername.local, and I have 2 sites running, one at http://computername.local and another at http://servicename.local. I can access each of these sites just fine from the local machine, but also want to be able to access http://servicename.local from an iPhone on the same WiFi network. I'm getting a timeout for that URL, but the other one works just fine.
I'm guessing something has to be done to allow servicename.local to be used on the local network, which I've left out. What is required to do that? Do I need to use Bonjour for that? Where would I add this new local hostname?
Another Mac on the same network can access this one under servicename.local just fine if I define the IP in its /etc/hosts file too, but I can't modify that file on the iPhone obviously. It's not jailbroken, and I'm not really interested in doing that just to get this working.
Not sure if it will help the OP, but another way of doing this - besides running a DNS server or jailbreaking the phone - is to run an HTTP proxy on the Mac, and configure the iPhone to use the proxy. Then the iPhone will pick up the Mac's local hosts file entries because it resolves DNS queries through the proxy. I've blogged about how to do this using the free Mac proxy "SquidMan" here: http://egalo.com/99j