SSH Tunneling not working properly - ssh

I created an SSH tunnel via Putty and configured firefox to use it. Everything is working properly.
I have a spare AWS server that I am using for this purpose. I have verified that firefox is indeed using the proxy by checking my IP address.
Now, I want to be able to use this tunneling proxy to access Facebook which is blocked at my workplace.
When I try to access Facebook via firefox with the tunnel, it still says that facebook is blocked?
What is going on here?

You can reach the same effect, i.e. to see facebook page and everything is forbidden in your network, by using Tor Browser

Related

Nginx reverse proxy works only outside lan

I have a server which has multiple "app pages" running on it. (for example: Home Assitant, Cockpit etc.).
On the local network I can access them using like http://192.168.1.200:8123.
I used to use port forwarding but I didn't wanted to remember ports so I'm using Nginx Proxy Manager and a DuckDNS domain.
So now outside of the local network I can type https://ha.mydomain.duckdns.org, which works fine, but if I'm connected to the local network my browser throw a PR_END_OF_FILE_ERROR message.
I tried it with multiple devices, different applications, even on the home assistant app, and got the same result.
I'm using SSL certificates created in Nginx Proxy Manager, but when using http I get an 404 error.
After long searches I found that I probably need a custom local DNS (like pihole) running, and my router DNS has to point to it. I'm not sure if this would even solve my problem, but I would like to avoid this method, cause if my server shuts down or has any problem, it would cause problem on all the devices in my network.

Is it possible to host a website on a computer but use the static IP from a vpn-server on a google cloud vm?

I have my website up and running on a google cloud vm. But it runs slow because i only use the cheapest one. Before upgrading the vm to a more powerful one, is it possible to host a website on my own computer using the IP from google cloud vm? I successfully set up a vpn server on it using softether (checking whatsmyip on my computer shows the public IP from google cloud vm). Any tips and help would be appreciated.
VPN is usually for outgoing connections, not incoming. Generally speaking, you would need to have some kind of thin server running on your cloud instance, that forwards all incoming connections to your home machine. From visitors' perspective they will be connecting to the cloud IP, but all the work will be done by your home PC.
Of course your home PC will probably have a dynamic IP so it will have to keep the server updated on this.
Here is one very simple implementation. Do not actually do this, it is just an illustration:
Run your website on your home PC so that it serves on eg. localhost:8000
Set up an SSH server on your home PC
SSH into cloud PC
From there, SSH back into your home PC with SSH forwarding of localhost:8000
Run the reverse proxy (eg. nginx) on your cloud PC and tell it to proxy to localhost:8000
Requests will be proxied to your home PC through SSH so long as the connection is alive. This is obviously not a convenient setup and letting a cloud machine SSH into your home PC is a bad idea for many reasons. You could try to restrict the SSH into your home PC, or even run a VPN server at home and have your cloud instance connect to that VPN to access the website. However that is still not a best practices way to do it.
A better way would be:
Obtain a stable URL (doesn't have to be a full domain, just something that can forward to you IP)
Run an nginx reverse proxy on your cloud server, and tell it to proxy to this URL
Ensure the URL points to your home PC when you IP changes (ideally you want an "update IP" script that runs everytime you turn on your home PC)
If you don't want a URL, you could also write a simple script to update a hosts entry on the remote machine with your home PC's IP.

Facebook app, OAuth redirect to local virtual machine

I've got a virtual machine running on ESXI which I use for local development, I access this machine in my browser via a local domain, http://dev for example. This all works well and no issue for years until I've just started using Facebook Login which requires OAuth redirect URLs to be 'real'.
I can no longer use my http://dev as it won't allow it, I noticed it will however allow http://localhost.
I should note I'm not always using apache/nginx etc so I don't want to be creating virtual hosts
How do I go about being able to register a virtual machine for a OAuth redirect when it's not accessible on localhost?
Despite being sure I've tried this before, I did just try the local IP address of the server (192.168.0.111) and looks like that worked for the redirect/callback on the Facebook Developers Console.
So, while not ideal, you can use the local IP rather than the hostname.

Charles Error Report: How to over come it?

I have recently switched from mac development environment to windows development environment. I was used Chrles proxy extensively to capture network traffic, requests and response details. Right now I have installed Charles proxy version 3.7 in windows 8. How ever I have observed that the website on which I am working is not opening at all with Charles proxy ON. It is showing below exception message. And it is working perfectly for all other websites.
Charles Error Report
Failed to connect to remote host
Charles failed to connect to the remote host. Check that your Internet
connection is ok and that the remote host is accessible. Maybe your
network uses a proxy server to access the Internet? You can configure
Charles to use an external proxy server in the External Proxy
Settings.
The actual exception reported was:
java.net.ConnectException: Connection timed out: connect Charles
Proxy, http://www.charlesproxy.com/
Research that I have done before coming to SE:
I have searched in google with the keyword "Charles Error Report-Failed to connect to remote host". I got couple of links which are related to the above issue.
First link says to check for external proxy setting. I have checked, there are no external proxy settings in my computer.
Second link says open the url in browser and close charles proxy and reopen it. I did that. Still no luck.
How to overcome this issue?
Do you get the same problem with other proxies like Fiddler? If so, it's probably not related to Charles but either a network problem or inability of your application to work with a proxy.
Other causes may be using HTTPS (which can cause certificate errors) or using the loopback address (localhost or 127.0.0.1) which may or may not be ignored by the proxy.
UPDATE
In IE10+ Enhanced Protection Mode prevents untrusted applications from accessing local resources. Pages and sites that are not in the Trusted Zone are considered unstrusted, so they can't connect to any local proxy. Fiddler includes a configuration button to configure Windows 8 to bypass this. You can find a very good explanation of what happens and why here.
In Windows 8, EPM is enabled only for Metro IE. In 8.1 it is enabled by default even for Desktop IE.
You may be able to make Charles work again simply by adding your site's address to the Trusted Zone in IE's security settings, or you can download the EnableLoopBackUtility mentioned in Configure Fiddler for Windows 8 Metro-style applications to allow IE to connect to your site through the local proxy
I have experienced this as a timing or caching related gremlin. For me, in most cases, this is resolved by doing force-reload a few times in the browser. Doing so is slightly different on each platform. In Mac/Chrome, holding down Command + Shift + R for a couple of seconds does the trick. In Win/IE, holding Shift and clicking the reload icon in the address bar a couple of times does it - in theory, Shift + F5 should do the same thing, but it does not work as well.

Cannot connect to AWS instance running Apache

I have an AWS instance running Apache server.
Apache is running when accessed from the local machine.
RDP connection through the elastic IP is working.
Port 80 is open for the security group
However, the elastic IP is not accessible from the browser.
Any ideas?
It could be a Security Groups is not configured to allow HTTP.
Go to http://aws.amazon.com Sign in.
Click on EC2. Then click on Security Groups. Click on the Security Group that your instance is using.
Click on Inbound tab. Click on Edit button.
In here, add you IP address (or Anywhere) for HTTP.
Unfortunately, that is not enough information for me to provide a definitive answer.
Here are some questions you can ask to help you figure out what may be wrong, however:
What happens when you run telnet 50.40.30.20 80 (where
50.40.30.20 is your EIP)?
You mention that RDP is working, is this a Windows instance (which requires port 3389 to be open for RDP)? or is it a Linux instance that requires port 22 to be open for SSH?
If Linux, is SELinux running? If so, you may find
this helpful
in disabling it temporarily or permanently to see if it has an impact on your ability to hit Apache.