Getting 403 forbidden error after setting up Raspberry pivpn - raspberry-pi

I have tried chmod making the directory executable and iptables to allow port 1194 forwarding so I don't think it is that. I'm still getting Error 403 Forbidden when trying to access the pivpn gui.
Has anyone been able to fix 403 error with pivpn?

Related

wget: unable to resolve host address 'terraria.org'

I am very unfamiliarized with linux and I have a spare pc lying around, I installed Ubuntu Server 20.04.4 LTS. It's all connected to the internet and I have verified that, but when I run:
terraria#mc-ubuntu:~$ wget https://terraria.org/api/download/pc-dedicated-server/terraria-server-1436.zip -O server.zip
all that it gives me is this that of which I have no clue what to do:
wget: unable to resolve host address 'terraria.org'
I need help, and yes I have tried in root, same output.
I checked if mentioned file exists using --spider option
wget --spider https://terraria.org/api/download/pc-dedicated-server/terraria-server-1436.zip
output
Spider mode enabled. Check if remote file exists.
--2022-06-28 10:19:47-- https://terraria.org/api/download/pc-dedicated-server/terraria-server-1436.zip
Resolving terraria.org (terraria.org)... 188.114.96.13, 188.114.97.13
Connecting to terraria.org (terraria.org)|188.114.96.13|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 43392536 (41M) [application/zip]
Remote file exists.
so URL you have used seems to be correct, therefore I suspect issue with DNS lookup. wget is unable to find IP address corresponding to terraria.org. You need to add some nameserver aware of terraria.org to /etc/resolv.conf file, I suggest trying Google one that is add following line
nameserver 8.8.8.8
to /etc/resolv.conf then write if it did help (I do not have ability to test that)

Eclipse Che Websocket Unable to Establish Connection

I'm running Che on WS2019 under Docker for Windows. When starting Che using the call from the guide (see copy below, custom port added) it pulls the container and sets it up all ok.
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /chedata:/data -e CHE_PORT=8090 eclipse/che start
When I open Che and go to the workspace (localhost:8090) to create a project, the create button is greyed out, and the browser console has the below errors.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://wsagent-http-dev-machine-workspacel90axz6gl3kl3mzl.192.168.1.100.nip.io:8090/api/project-type. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Firefox can’t establish a connection to the server at ws://localhost:32845/wsagent?token=. playground:18015:24
ERROR (org.eclipse.che.ide.projecttype.ProjectTypeRegistryImpl): Can't load project types: org.eclipse.che.ide.commons.exception.ServerDisconnectedException _app-0.js:17942:126
WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32845/wsagent?token= _app-0.js:17942:126
Firefox can’t establish a connection to the server at ws://localhost:32845/wsagent?token=. playground:18015:24
WARNING (org.eclipse.che.ide.websocket.impl.BasicWebSocketEndpoint): Error occurred for endpoint ws://localhost:32845/wsagent?token=
To keep firewalls out of the issue, I've disabled windows firewall. Initially I have tried to fix the CORS issue by using CHE_CORS_ENABLED with no such luck.
I've tried specifying CHE_HOST and CHE_DOCKER_IP_EXTERNAL flags with effectively the same result. I have also tried using CHE_SINGLE_PORT=true, with again a similar issue.
I've looked at a lot of the other GitHub issues reported on Che (e.g. https://github.com/eclipse/che-dockerfiles/pull/11) and have been going at this for a good few days to no avail.
Any suggestions would be helpful,
Inci

Problem creating REST API With JSON Server

I am going through the tutorial: https://www.youtube.com/watch?v=x3NAo8zqdmo
to set up json server. I am able to install it, however when I run the command json-server --watch db.json, I keep getting error
events.js:183
throw er: //unhandled 'error' event
I googled the error, there is nothing running on port 3000 . I even rebooted my machine but error did not go away.
I reinstalled json-server using my company's proxy settings to go behind proxy settings since I had to do that for angular cli installation, but still error is not going away. Any tips?
I was able to resolve the issue by changing the port with command
json-server -p 4000 db.json

AWS EC2 403 Forbidden error

I have a development version of my application deployed on ec2 and I'm getting a 403 Forbidden Error on navigating to the given public IPV4 address.
I can start rails c after ssh-ing into the instance and manipulate the data from there.
Since the 403 Forbidden is from nginx so I checked the error logs and found the following:
*191 directory index of "/home/ubuntu/<app-name>/client/" is forbidden, client: <client-ip>, server: _, request: "GET / HTTP/1.1", host: "<host-ip>"
Which is clearly the error I'm getting. Checking my psql logs shows me the following:
So the error is in how my credentials are setup.
I tried to go to my pg_hba.conf and my navigation route was cd /var/lib/postgresql/9.5/main but I can't cd in to main after that since it says permission denied
I tried to view the pg_hba.conf by running:
sudo vim /var/lib/postgresql/9.5/main/pg_hba.conf but it tries to create a new file so clearly the file doesn't exist in that path.
I already ensured that my credentials are correct by doing sudo -u postgres psql
Also, the request from my front end is being made from port 80 and I checked that I have that in the security configuration for my EC2 server

Error: connect EINVAL hubot

I'm trying to do a msg.httpto a localhost url, but I am getting back the following error:
Error: connect EINVAL 0.0.xx.xx:80 - Local (0.0.0.0:0)
Does anyone know a fix for this?
Edit:
I can of course access the url in the browser.
I've tried (unsuccessfully) to try faking a redirect (using Ubuntu's /etc/hosts file))
Playing around with the hosts file fixed it!