Using http service and its client in the same computer - http

I am going to develop a http service and an application as its client which both of them are in the same computer.
I have 2 questions :
Might any firewall block this application?
If so, how can i solve the problem?
Tanx in advance.

No the firewall will not block the application.
You can use 127.0.0.1:80 to access the local http service. 80 is the default port number and you can drop it. Alternatively, you can use something like http://localhost to test it.

Related

How to reverse proxy a TFS server

We're using a TFS server 2017 update 2 in our local office.
But we need access the server at home, we tried to use nginx for build a reverse proxy to access TFS server, but failed.
Also the Apache haven't ability to do that to pass the NTLM authorization of TFS.
Do someone know how to do that?
Both nginx and Apache server can't handle NTLM authentication properly. Even if use "stream" server in nginx, it still throw exceptions at times. So the best way that I've found is to write a pure reverse proxy with socket in NodeJS.
Please try the code here: https://gist.github.com/gekowa/7fdd6fa6db51a7671de5469b3943a9da
The implementation was pretty straightforward, it just double pipe local and remote sockets, and everything is just fine.
node tcpproxy.js 8080 your_internal_server_address your_internal_port
Best choice:your_internal_port=8080

SignalR port requirement

I haven't found much discussion about this...
Most signalr samples I have seen would send and receive via a designated port like 5000 or 8080
I have a need for chatting in my app. My asp.net backend site does more than just handling messages between users, so it doesn't make a difference for me to host another page for that in the site my iis.
I understand the difference of having the signalr self-hosted or hosted normally in iis... If I have it hosted by iis, so my users will access the page normally without a port, would that make a difference? Is there something internal in signalr that is preferring the use of a port? What are the pros/cons of using ports with signalr?
SignalR has no preference for a specific port. When no port in specified in the URL then the port is implied from the protocol, e.g. HTTP uses port 80 and HTTPS uses port 443. So there is no concept of SignalR without a port.
I would think that the main reason for using SignalR on a different port than the rest of your site is that you can host SignalR independently of your main site without any interference in URL's etc. On the other hand, using a non-standard port may give you problems with restrictive firewalls that only allows traffic on port 80 and 443 to pass. When using a different port for SignalR you also lose the ability to use relative URL's to specify the SignalR endpoint.

Problems with DNS

Good afternoon in my timezone.
I am developing a web appp in J2EE.
This web app is called and access inside a sharepoint portal.
When i enter through the sharepoint portal i can access my application, using chrome developes tools i can see all the HTTP traffic, and i see that the browsers sends a request to the following server that is where my app is running serverprd.enterprisename.com.
But when i use the command line in my windows 7 , to ping the machine(server) , for example :
ping serverprd.enterprisename.com it returns me the following message:
"Ping request could not find host serverprd.enterprisename.com"
I am using a proxy.
Can anyone tells me why this happening ? Why through the browser i can access the server and the ping command does not find me the server ?
With the best regards.
Thanks in advance.
Your proxy server id the one who have an access to outside world. All http requests are sent to proxy server and proxy server does DNS lookup. In case of pin, your host have to do DNS lookup and this operation obviously now allowed ( firewall or so).

Unable to obtain tokenresult oauthClient.ExchangeCodeForAccessToken; unreachable network 69.171.229.24:443

I developed an FBConnect web application using C# .Net Framework 4.0 recently. Tested with my UAT server, everything just works fine, I'm able to login with my Facebook account, and perform all operation.
Unfortunately when I deploy the same code to my client's production environment, the FBConnect return "unreachable network 69.171.229.24:443". After several investigation, notice the port 443 is blocked! And due to corporate policy, this port is not allowed!!
Is there alternate way I can tweak my facebook app settings NOT to authenticate via port 443? instead of rewriting my code?
Please advice.
No, there is no alternative.
Port 443 is for secure HTTPS connections using TLS and SSL. Facebook, quite correctly, restricts access to their authentication mechanism to this port: (as far as I know) there are no alternative mechanisms that use a different port or an insecure login on port 80.
Check with your client to see if there's an proxy server that can be used for HTTPS connections.
Otherwise, request that your client opens that port.

How to restrict connections to glassfish?

I'm running a web application on a glassfish 3 server. The application should not be accessible for anyone. Instead I want to limit access to a handful static IP addresses. To block all communication via a firewall is not an option, since the server hosts other web services too.
Given this background, my question would be:
How can I tell glassfish to only respond to requests from given number of IP addresses?
Your help is highly appreciated!
IP based security is not very robust and... secure (think network topology changes, IP spoofing) but it should be possible to:
create a virtual server
configure the application to be available on that virtual server only
define allowRemoteHost/denyRemoteHost properties at the virtual server level
A better alternative would be to move to certificates.
You can always write a filter that returns 404 or whatever for invalid IPs. Note that IPs can be spoofed.

Resources