Docker pull requires auth using IPv6, but our IPv6 is blocked - windows

We are running into an issue, which has just popped up (was working fine before the start of the month).
The issue is we get sent to auth.ipv6.docker.com, when trying to get images from Dockers registry or just running a docker login, but since ipv6 is blocked at our company, that fails.
The simplest way to replicate it, is to run this command:
docker run hello-world
or
docker login
docker: Error response from daemon: Head "https://registry-1.docker.io/v2/library/hello-world/manifests/latest": Get "https://auth.ipv6.docker.com/token?scope=repository%3Alibrary%2Fhello-world%3Apull&service=registry.docker.io": dial tcp: lookup auth.ipv6.docker.com: no such host.
If I open https://registry-1.docker.io/v2/library/hello-world/manifests/latest in a browser and look at the response headers, I see that it says get bearer token from the ipv6 site:
www-authenticate
Bearer realm="https://auth.ipv6.docker.com/token",service="registry.docker.io",scope="repository:library/hello-world:pull"
So not sure, if there has been a change in our end and Docker "senses" we have IPv6 and gives us the ipv6 auth server or it is a change at Docker. It seems to be because of our company running Symantec Web Security Service and traffic tunneling through them (and perhaps they show us having an IPv6 address?).
Anyone else had this issue or knows how to mitigate it ?

Related

Failed to listen on 127.0.0.1:443 (reason: Permission denied) [duplicate]

This question already has answers here:
OSX: Failed to listen on localhost:80 (reason: Permission denied)
(4 answers)
Closed last year.
hope you are all good,
I 'am working on a react native app for android, and i need data from my laravel API, the route works fine when i test it with Postman but on my mobile app i got an Error : Network Error.
I have been told that is because i need to put my laravel project on https so i tried
php artisan serve --port=443
but i got this error
Failed to listen on 127.0.0.1:443 (reason: Permission denied).
i'am really stuck and i don't know where the problem is...
Thank you all for you help mates
You've got a bunch of misconceptions interacting with each other here.
Misconception: Running on port 443 will give you HTTPS
Your attempted solution is to make your server listen on port 443, which is the default port for HTTPS.
It is failing because you are running the server as a user that doesn't have permission to listen on that port.
While you could solve that by running with admin privileges, that will just mean you are running an HTTP server on the default HTTPS port. Anything connecting to https://127.0.0.1/ will get an error because it will try to establish an encrypted connection and the HTTP server will be confused.
As far as I can tell, Artisan doesn't support HTTPS directly and you have to use a proxy server instead.
If you were to go down that route, then you could run both Artisan and the HTTPS proxy on any port. You can port a port number in an https:// URL just as you can with an http:// URL.
Misconception: You need HTTPS
You're getting a Network Error error when you try to connect from the mobile app.
While there are some things which require HTTPS, just loading a web page isn't one of them, and the things that do generally are quite explicit about requiring HTTPS in their error logs.
The real cause is most likely because the server is listening on 127.0.0.1 — localhost. It isn't accessible from a different computer.
Solutions
Listen on a different Network interface
You can listen on a non-privileged port on a LAN-facing IP address and then any device on your LAN can connect to it.
php artisan serve --host 192.168.1.101 --port 8000
Make sure you replace the host with an IP address belonging to your computer!
Use a proxy
A service like ngrok will expose your local (listening only on localhost) service on the public Internet (tunneling through any NAT on your router if needed) making it accessible to just about any device.
It can wrap it in HTTPS at the same time if you like.

Not able to access Rest Endpoint by machine name over vpn

I am facing issue with Rest Endpoint. When I am trying to access url with machine name instead of localhost, It is giving Access Denied error. It will give this error only over VPN connection otherwise it is working fine without VPN.
I do not have same issue with browser. Browser is able to identify url with machine name. This issue is only when I am trying to consume any endpoint running on different microservice on same machine through Java code or Postman
For Example, If I am consuming some endpoint in Java.
restTemplate.getForEntity("http://localhost:8761/actuator/beans", Object.class).getBody()
//Working fine
restTemplate.getForEntity("http://my_machine_name:8761/actuator/beans", Object.class).getBody()
//Access denied
or through Postman
http://my_machine_name:8761/actuator/beans
Error: connect EACCES 192.xxx.x.x:8761
Mainly I am using Discovery Client to identity the machine name and port so that I need not to hard code localhost in the url. I am using FeignClient for loadbalancer but looks like restTemplate is also giving same error.
I have fixed above error. If you connect your machine with VPN, it change your network. So you need to find which ip address is getting used in your machine. Try ipconfig in command prompt to find the ip address in Windows.
If you give your machine name instead of above IP address then it will not be able to find your machine as your machine name is not available in your network (because of VPN connection).
machine.ip.address=XX.66.223.XXX
eureka.client.service-url.default-zone=http://${machine.ip.address}:8761/eureka
eureka.instance.hostname=${machine.ip.address}
Provide your network ip address in your URL instead of machine name to make it work.

ec2 hosted lamp site not visible from browser

I have setup an Amazon EC2 Ubuntu 16 server for the first time.
With the issued public IPv4 IP address I have ssh'ed into the server and installed a lamp stack.
However when I paste the IP address into my browser I get the following error:
Error
The requested URL could not be retrieved
Error: Access to the web site failed
Why you are seeing this:
The web filter could not display the requested site.
Possible reasons could be:
The web site denied you access, or the web filter received no reply from the site.
Internet connectivity issues might be preventing the website from sending or receiving traffic.
If this problem persists, please ask your administrator to:
Check access to the specific site - the HTTP error code is 504: Gateway Timeout.
From what I've seen online, I should see the default apache webpage from my server at this point.
Can anyone shed some light on this issue?

Cross-Origin Failure with Express Node Server

My code works perfectly on localhost but when I get it uploaded to my Debian VPS server it will not fire. However a cURL -H -origin request works perfectly... I've tried everything PLEASE HELP!! lol
Here is my Firefox-Firebug error:::
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:10005/threadpreview. (Reason: CORS request failed).
This is really a HUGE problem for me. I've tried just about EVERY Access-Control-Allow-Headers/Methods/Origin combination possible. Truly at a loss. I've also tried all the preflight requests. It shouldn't need one but I've still tried to no avail.
Could it be server security? I am working off of a VPS Debian Squeeze server.... Their firewall maybe?
This is my portfolio I need to get online so I can get myself employed.... sigh! Please help and thanks!!
When you are accessing your webpage on a remote server you can't use local host.
You want to make the request against your vps IP address. Or domain name if you have it.
Calling local host on a browser client is going to request resources from the client computer as opposed to your server

cPanel stopped responding to curl requests

I'm on a VPS and use a bash script to deploy websites to subdirectories inside on of my accounts. I've been using this script with no issues until today, randomly, cPanel decided to ignore curl.
In this script I automatically create a database and add a user to it, which is accomplished via curling cPanel with the appropriate information.
Here's what I was doing and previously was working flawlessly.
curl -k -v -G -d db=$db_name https://$cpanel_user:$cpanel_password#$cpanel_host:2083/frontend/x3/sql/addb.html
I isolated this line to a separate script to debug. Here's the kicker, the server simply doesn't respond. Curl just says Trying X.X.X.X... and then eventually the connection times out. Curl works for everything else so I know that's not it. Just for grins I tried wget and it can't establish a connection either.
I have [had] security tokens disabled in cPanel.
My question is what would cause the connection to fail? I'm stumped as this worked yesterday.
I don't mind investigating and debugging, but with no errors or anything I simply don't know where to look. I talked to my host and they said there hasn't been any firewall/security updates rolled out.
Suggestions on issues or where to look?
Edit: So if I run that curl command locally in OSX it fires up and creates the DB no problem. So for some reason the URL isn't responding to my own server (itself) o.O
Edit 2: It seems my server can't curl itself on that port I need (dunno why it would have stopped). For example if I curl my server IP or a domain on my server (from the server) it works. If I try to curl my ip:2083 it won't resolve.
How can I allow curl to work with port 2083?
My firewall CSF just allow incomming TCP connexion on port 2083 to the server. But the other one blocked the outgoing tcp connexion on port 2083.
So opening both port IN-OUT on both server solved the issue.

Resources