Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: Application to edit .conf files?

  1. #11

    Default Re: Application to edit .conf files?

    Thank you once again

    I'll report back later this evening.

  2. #12
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,305
    Blog Entries
    2

    Default Re: Application to edit .conf files?

    Quote Originally Posted by malcolmlewis View Post
    Hi just add your nameservers and add a # to the current ones;
    Code:
    search some.domain
    #nameserver you.cur.ren.t01
    #nameserver you.cur.ren.t02
    nameserver xxx.xxx.xxx.xxx
    nameserver xxx.xxx.xxx.xxx
    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!
    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.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #13

    Default Re: Application to edit .conf files?

    Open a terminal and do the following:

    1. Make a backup of resolv.conf in case it needs to be restored later.

    sudo cp /etc/resolv.conf /etc/resolv.bak

    2. Edit existing .conf

    sudo nano /etc/resolv.conf

    3. Please remove the listed DNS server(s) and add our DNS servers:

    nameserver 209.222.18.222

    nameserver 209.222.18.218

    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​
    Does that sound like it should work OK? I will do this, but edit in kwrite.

    Cheers

  4. #14
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,166

    Default Re: Application to edit .conf files?

    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.
    Henk van Velden

  5. #15
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,305
    Blog Entries
    2

    Default Re: Application to edit .conf files?

    Quote Originally Posted by thestig View Post
    Open a terminal and do the following:

    1. Make a backup of resolv.conf in case it needs to be restored later.

    sudo cp /etc/resolv.conf /etc/resolv.bak

    2. Edit existing .conf

    sudo nano /etc/resolv.conf

    3. Please remove the listed DNS server(s) and add our DNS servers:

    nameserver 209.222.18.222

    nameserver 209.222.18.218

    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​
    Does that sound like it should work OK? I will do this, but edit in kwrite.

    Cheers
    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
    Code:
    cat/resolv.conf
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #16

    Default Re: Application to edit .conf files?

    Quote Originally Posted by hcvv View Post
    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.
    Well...

    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.

    Thank you once again

  7. #17
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,305
    Blog Entries
    2

    Default Re: Application to edit .conf files?

    If you want to spend a little more time on this...

    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?

    PIA on 13.2
    https://www.privateinternetaccess.co...-opensuse-13-2

    PIA on Fedora (and openSUSE setup would likely be very similar)
    https://helpdesk.privateinternetacce...etup-in-Fedora

    PIA on Debain/Ubuntu but with some knowledge can be adapted to openSUSE
    https://helpdesk.privateinternetacce...N-PIA-on-Linux

    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).

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #18

    Default Re: Application to edit .conf files?

    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:


    1. sudo apt-get install openvpn
    2. cd /etc/openvpn
    3. sudo wget https://www.privateinternetaccess.co...pn/openvpn.zip
    4. sudo unzip openvpn.zip
    5. ls -l
    6. sudo openvpn 'config-Filename-goes-here.ovpn'

    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


    1. cd /etc/openvpn
    2. 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.

    Thank you!

  9. #19
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,305
    Blog Entries
    2

    Default Re: Application to edit .conf files?

    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)
    Code:
    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

    1. I assume you successfully installed openvpn <not> 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.
    Code:
    zypper in openvpn NetworkManager-openvpn
    2. 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
    Code:
    ls -l
    An aside,
    If you wanted to configure openVPN in Network Manager, I posted this recently...
    https://forums.opensuse.org/showthre...58#post2804158

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  10. #20

    Default Re: Application to edit .conf files?

    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.

    thanks for your help everyone


Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •