I try to connect to the VPN with openvpn.
If I connect from the cli with sudo openconnect..... its working fine. The vpn change the /etc/resolv.conf to the desired format.
But If I would connect from the GUI. Settings > Network > VPN it doesn-t change the resolv.conf
The SELinux is in permissive mode
/etc/NetworkManager/NetworkManager.conf
Should contains the following setting
[main]
dns=dnsmasq
And everything will goes well. If you want to keep an ability to use internet during you are on vpn. Add the google dns (8.8.8.8) to the vpn settings aswel
Related
I am facing one error while installing FCL-CLI on my system (linux).
The command I have used is : sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" .
Error: curl: (28) Failed to connect to raw.githubusercontent.com port 443...NEED HELP!
Set DNS 8.8.8.8 in network will resolve this
Faced the same issue while trying to install nvm on ubuntu. Following steps solved my issue:
1)Open the /etc/hosts file using
$ sudo nano /etc/hosts
2)Enter your password.
3)Add the following IP address at the end of the file:
185.199.108.133 raw.githubusercontent.com
4)Save and close the file.
5)Now Try installing Again.
This my fix your problem.
Change from network in setting.
Open the /etc/hosts file using
$ sudo nano /etc/hosts
and then add following IP
185.199.108.133 raw.githubusercontent.com
save it and reinstall it again
For Windows Users:
Go to the Control Panel.
Click Network and Internet > Network and Sharing Center > Change adapter settings.
Select the connection for which you want to configure Google Public DNS. For example:
3.1 To change the settings for an Ethernet connection, right-click the Ethernet
interface and select Properties.
3.2 To change the settings for a wireless connection, right-click the Wi-Fi
interface and select Properties.
If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
Select the Networking tab. Under This connection uses the following items, select Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol Version 6 (TCP/IPv6) and then click Properties.
Click Advanced and select the DNS tab. If there are any DNS server IP addresses listed there, write them down for future reference, and remove them from this window.
Click OK.
Select Use the following DNS server addresses. If there are any IP addresses listed in the Preferred DNS server or Alternate DNS server, write them down for future reference.
Replace those addresses with the IP addresses of the Google DNS servers:
For IPv4: 8.8.8.8 and/or 8.8.4.4.
For IPv6: 2001:4860:4860::8888 and/or 2001:4860:4860::8844.
For IPv6-only: you can use Google Public DNS64 instead of the IPv6 addresses in the previous point.
Test that your setup is working correctly; see Test your new settings.
Repeat the procedure for additional network connections you want to change.
Ref: [https://developers.google.com/speed/public-dns/docs/using][Configure your network settings to use Google Public DNS]
Use a VPN or go to 1.1.1.1 in your browser and use WRAP by Cloudflare. Worked for me 👍
I am connected to a corporate VPN and need to be able to run docker containers while the VPN is connected due to the fact that the container needs to be able to access corporate endpoints. However, when I am connected with AnyConnect VPN, docker has no internet access at all. Neither to our corporate endpoints or the internet.
I am running CentOS7 as my host operating system.
A simple way to reproduce this issue is to install a minimal linux distro, install AnyConnect VPN, connect to vpn and try to run the following docker container:
docker run -i -t ubuntu:14.04 /bin/bash
Once inside the container I try to ping google dns
[###]$ ping 8.8.8.8
There will be no response. If I disconnect from AnyConnect VPN and retry the above, I get a ping response.
How can I fix this issue?
Ping outside and internet access are different. You could access internet but could not ping as limit by your corporation network. I suggest running busybox
docker run -it --rm busybox
and check the dns setup inside
cat /etc/resolv.conf
From there you may see list of nameserver ip addresses. Now you could try to ping those to make sure they are reachable from inside. If not, you could try
traceroute 1.2.3.4
to see how far you could go from inside container, the first 2 lines should be ip of docker and the host machine, and then the ip of your corporation network
1 172.17.0.1 (172.17.0.1) 0.016 ms 0.011 ms 0.009 ms
2 10.1.249.4 (10.1.249.4) 38.487 ms 35.697 ms 35.558 ms
Usually it's problem of the nameserver generated inside /etc/resolv.conf
file. If it's the case, then you need to check /etc/resolv.conf
in the host machine and update the docker setup to generate the nameservers correctly inside container.
After you make a change to the network interfaces, you often need to restart the docker engine to rebuild all of the routes and iptables entries. With Linux and systemd, use:
systemctl restart docker
I have set up a VM in azure with Redhat Linux OS, I have installed Httpd service and placed a static webpage to access.
I am not able to access my VM via browser with public IP set on my VM. Although, I am able to ssh into the machine.
Steps I have already tried:
Set an inbound rule on the network security group for port 80, 443, 22(ssh).
Attached this NSG to both VNET & NIC but no luck.
Tried the same in AWS EC2 instance it works like a charm. Not sure why Azure is not that straight forward.
Tried to find the solution online and documentation but no luck.
Please help if you have any idea how can I access my app via a browser.
Please check, if SELINUX is configured correctly
Redhat reference here: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/managing_confined_services/chap-managing_confined_services-the_apache_http_server
Thanks,
Manu
Thanks Manu for your suggestion. But I found that Linux firewall was blocking it. So here is what I did:
Since I am using RHEL 8, the inbuilt firewall is via Firewalld not iptables(which is there for RHEL 6 and before).
1- By default, only port 22 open in firewalld. "firewall-cmd --list-all" command will show the details.
2- Added HTTP port. By using below 2 commands
$ sudo firewall-cmd --zone=public --add-service=http --permanent
$ sudo firewall-cmd --reload
3- Verify the change by using any of the below commands:
$ sudo firewall-cmd --list-services
$ sudo firewall-cmd --list-services --permanent
Please refer this link for more details:
https://www.cyberciti.biz/faq/configure-set-up-a-firewall-using-firewalld-on-rhel-8/
I have a Ubuntu VM on Azure (Resource Group, not the Classic VM) and it all worked out of the box. I recently tried to SSH into the VM using Putty and I could not.
I get the error: Network Error: Connection Timed out.
I have made sure that the port 22 is opened for SSH on the VM Inbound rules.
I had this VM setup about 2 months ago for a side project and at that time I was able to SSH easily without any troubles. Now I can't. Am I missing something?
PS: The HTTP works fine. I have the website running on it and it shows up in the browser. Also, I tried using a browser-based SSH client and it was able to SSH into the VM.
Looks to be an issue with the local firewall. Try resetting the SSH configuration in the portal.
Go to Azure Portal
Select VM in question
Select Reset
Password
Select Reset Configuration Only
Select Update
I am adding this because it might help someone, the chosen answer did not work for me
for some reason the firewall on the ubuntu server
Go to Serial Console type in your ssh username and you will be logged into the server
Check the firewall status to see if port 22 is allowed
sudo ufw status verbose
If the rule is not there then add it
sudo ufw allow ssh
I encountered the same issue. The following is how I solve this issue:
Don't add any port While creating your VM, do it only after only the VM is created
Add the port 22 in the networking tab until the VM status is Running.
When a new VM is created on Azure, by-default the Protocol TCP on Port 22 is Disabled. Need to allow this.
Follow:
https://medium.com/techinpieces/practical-azure-how-to-enable-ssh-on-azure-vm-84d8fba8103e
Create below directory : mkdir -p /run/sshd
Then restart service : systemctl restart ssh
This will definitely solve your issue.
As said in headline, from Win7 host I'm trying to access Postgres 9.3 established in Linux Centos 5.8 which is in VirtualBox on the same machine. I'm trying to access it from PGAdmin and everything is OK when I start the Postgre from Win7 services, so PGAdmin is well configured.
What have I tried? I've read many articles about this subject, and even some questions on this forum but nothing worked. I have:
switched to NAT and forwarded port 5432 in VirtualBox GUI
set listenadresses = '*' in postgresql.conf file
put host all all 10.0.2.1/24 md5 line in the pg_hba.conf file
put 5432 port inbound and outbound rule in win7 firewall settings
disabled linux firewall with #service iptables stop
Just to mention. When service is started in virtual linux, I can access it from linux, so service is properly started. Problem is that windows doesn't see that service. And when service is started from linux, I can start the same service in Win and vice-versa although the port 5432 should be occupied.
The most suspicious part to me is point 3) because I'm not sure whether i have put good address in rule. That address vary from article to article, and I would appreciate if someone could explain me how to be sure which address (or range) to put there, according to my network. Or some other advice if possible. Thanks.
Solved.
Replacing:
"host all all 10.0.2.1/24 md5" with "host all all 0.0.0.0/0 trust" solved it.
In my case adding the below line to pg_hba.conf was enough:
host all all 10.0.0.0/16 md5
and then restart:
sudo /etc/init.d/postgresql restart
The Solution by Filip works, but you can tailor it further.
First, enable Adapter 2 in VM and set it to Host-only Adapter:
Second go to your host machine and find it's ip address.
This can be found by running ipconfig in your windows host machine.
Now you need to edit two files in your VMBox.
First is postgresql.conf
sudo nano /etc/postgresql/<version>/main/postgresql.conf
and add the following line:
listen_addresses = '*'
save it and then edit pg_hba.conf
sudo nano /etc/postgresql/<version>/main/pg_hba.conf
Here you need to add your host machine ip (in my case it was 192.168.56.1:
host all all 192.168.56.1/0 trust
Save it and restart postgresql
sudo /etc/init.d/postgresql restart
Now you can use pgadmin to connect to vm postgresql.
Convenience!