Been having some minor problems with my VPN after getting a new router and private internet access (the company I use) have suggested editing **/etc/resolv.conf by using the command ****sudo nano /etc/resolv.conf but it says command not found for nano. I was in a real hurry this morning so couldn’t check, but is this something I can easily install, or is there another piece of software LEAP uses instead? There was another thing they asked me to type in a while ago to get the software, but LEAP uses zypper so I had to change the command, so wondered if LEAP was similar.
That’s great, thank you. When I open the file using nano (through the terminal/konsole) does it open a standalone text editor or something? I’ve been asked to edit the file to delete the DNS servers currently in the file and replace with their own ones to see if that sorts my issue.
If your using NetworkManager for VPN, then you should be able to just
configure here?
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.22.2|4.4.57-18.3-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
You asked for nano, so they told you how to get nano.
Now it seems that you do not know how to use nano.
As your goal is to edit some text file, just use your favorite text editor. Only thing is to use it “as root”. Thus
either, when it is a text editor, from a terminal emulator (like konsole) running as root (directly from the menu or after typing
su -
)
or when it is a GUI editor starting it from the
Main menu > Execute Command > in the field: kdesu kwrite /etc/resolv.conf
or similar for other editors and/or DEs.
It’s not configured with NetworkManager…for some reason it comes up with an error saying it couldn’t start the process, so I use the terminal instead. I’ll give this a go later tonight, hopefully all will be well! I’ll let you know how it goes.
Thank you hcc. I’ll actually try using KWrite. Although I THINK I tried “su kwrite /etc/resolv.conf” earlier and it said it could not connect to display (note, I didn’t use “kdesu”). I’ll try this later. If Kwrite doesn’t work, what other basic editors are there that I can install?
will not do it as you found out.
Please understand that it is of NO IMPORTANCE which editor you use.
When it “does not work” it is not the editor, but the way you use it that is wrong.
Adding nameservers directly to /etc/resolv.conf only works for the current session and won’t survive a reboot.
Follow the instructions in the comments in /etc/resolv.conf to make persistent changes.
But, as mentioned elsewhere,
Assuming you’re using Network Manager, it’s better to configure your DNS servers there instead.
Press control-x, and hit y and enter to save and exit nano. Once the changes are made, please try connecting again and check for data flow.
If the configuration reverts when you boot, a starting process is changing the resolv.conf back to it’s original format. This can be prevented by opening Terminal and typing:
chattr +i /etc/resolv.conf
The file will need to be unlocked for further modification. To revert the immutable attribute, just replace run the same command with -i
chattr -i /etc/resolv.conf|
[/TD]
[/TR]
[/TABLE]
Does that sound like it should work OK? I will do this, but edit in kwrite.
Again, you should use the editor of YOUR choice. What you now show is all sorts of nano commands and manipulation… I never used nano, thus I can not comment on it.
Do you never use a text editor?
Another thing is the problem behind your inability to us an editor.
What s the problem you ty to resolve by editing //etc/resolv.conf. you seem to have an idea what and how to fix something there, but wweedo NOT know what this is and although there are some suggestions on what you could do, IMHO the real problem is undefined here.
Instead of making your system fight with itself by locking your file, you should read the comments in /etc/resolv.conf which says you should instead make some modifications (entering your preferred DNS servers) in /etc/sysconfig/network/config, and then the comments suggest various changes. Or, if you really want to edit /etc/resolv.conf directly, the comments also describe how you can disable automatic config updating.
You can read all this in the /etc/resolv.conf file
I had my VPN set up working absolutely fine, but we got a new router yesterday and since then, as soon as I connect, my internet connection stops working. My web browsers say “resolving host” and then it just fails to connect. I run dual boot and my windows machine (uses the private internet access software) works absolutely fine…so it’s definitely something to do with Linux. When I try to connect it says “initialization sequence completed” which is what it says when it connects correctly to the VPN, yet the internet then stops working. Prior to connecting to the VPN, the internet works absolutely faultlessly.
You need to back up and describe exactly what error message you’re seeing. We’re all making suggestions based on your original request in your first post which is based on a “suggestion” by your VPN Provider, but… No one really knows why your VPN Provider arrived at this suggestion.
So,
The first thing to know is that if you want to, it’s possible to configure your router to be your VPN beach head (The VPN endpoint) instead of each individual machines in your LAN. I won’t necessarily suggest you do that now, but keep that in mind for the future. It would then mean that all your machines in your LAN (Windows, Linux, etc) would connect “normally” without VPN configurations. But, set that aside for now…
First thing you need to do is provide the reference you’re using to set up your VPN, it should generally either be a downloadable app (Not that common for Linux machines, but common for Windows machines and sometimes Macs)… Or, a “How to” guide for configuring your machine. Might your original setup be based on something like the following?
Additional details you need to provide
Are you managing your networking with Network Manager or Wicked(Classical ifup/ifdown)?
What Desktop are you running?
What VPN protocol are you setting up? OpenVPN is generally recommended, but there are many other possibilities including PPTP (likely how your Windows is set up), L2TP, IKEv2, more.
Lastly, in general, are you trying to set up your VPN to start automatically on boot or manually invoked? (The latter is generally preferred in most cases).
Hi there and thanks again for taking the time to reply. It’s using NetworkManager to connect, although that cannot seem to start the VPN so I do it via the console every time. The installation was as follows:
from which you can see I’m using openVPN. I’m running KDE on LEAP 42.2
So each time I boot, I open a console and just do
cd /etc/openvpn
sudo openvpn ‘config-Filename-goes-here.ovpn’
This was working absolutely fine until the router change. I had KTorrent running, and that still works after I have activated the VPN, but my internet browser, or YAST software updater etc does not. And as said, my windows machine works fine using their application.
First,
I’d recommend you update your system which should include your installed openvpn and related packages, you can run the following in an elevated console (either su or sudo)
zypper up
After the above command, you can try running your openvpn connection command again.
If you still have problems, you need to do the following
I assume you successfully installed openvpn using apt-get, for instance the following. If you’re not sure, then just run the command again, and if anything was missed, will be installed and if you already have everything, the command will do nothing.
zypper in openvpn NetworkManager-openvpn
Please post the results of “ls -l” to know exactly what was included in your zipped package. It’s possible you will need to do more with those files than just use the ovpn file. You need to navigate your console prompt to the directory containing those extracted files, then rung the command
Well I edited the file as they suggested and it seems to be working absolutely fine now, even after a reboot
I used kwrite to edit the file. I have tried using it via networkmanager but it doesn’t seem to work, I got the same issue (“resolving host”) so I’m assuming I’d need to edit the DNS servers again. I set up the VPN using networkmanager by importing the VPN .ovpn file, entering my username and password, but even then networkmanager still asked me for my rootpassword and the VPN password when I tried to log in, so considering networkmanager seems to want to ask for that I’m perfectly happy to run it via the console.