Bug 592630 - openswan irrevocably corrupts /etc/resolv.conf
openswan irrevocably corrupts /etc/resolv.conf
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openswan (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Avesh Agarwal
Aleš Mareček
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-15 16:11 EDT by Matěj Cepl
Modified: 2010-11-11 09:52 EST (History)
2 users (show)

See Also:
Fixed In Version: openswan-2_6_24-4_el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 09:52:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matěj Cepl 2010-05-15 16:11:04 EDT
Description of problem:
When using vpnc (or openvpn) I get /etc/resolv.conf of this kind:

johanka:matej# cat /etc/resolv.conf
# Generated by NetworkManager
domain redhat.com
search redhat.com
nameserver 10.33.63.7
nameserver 10.32.63.5
nameserver 192.168.1.1
johanka:matej# 

i.e., aside from the RH internal DNS servers I have also as a third server the original non-VPN server. Seems, more secure in case of temporary failure in connection to VPN. Also, when other VPNs are stopped (be it because of failure of underlying network connection or because VPN is just switched off) then the original /etc/resolv.conf is restored. Not so with openswan. I get VPN-only DNS nameservers and when VPN terminates, the original /etc/resolv.conf.

Version-Release number of selected component (if applicable):
openswan-2.6.24-3.el6.x86_64
selinux-policy-3.7.19-12.el6.noarch

How reproducible:
100%
Comment 2 Avesh Agarwal 2010-05-18 10:20:13 EDT
Did you check if you observe the same behaviour when vpnc is run on the command line not through the network manager?
Comment 3 Avesh Agarwal 2010-05-18 11:17:06 EDT
I tested locally and found that when vpnc is run from command line, the /etc/resolv.conf output is same as what we get with Openswan. 

NetworkManager(NM) has the ability to get DNS information from multiple sources. So when vpnc is run through NM, NM takes care of configuring /etc/resolv.conf.  Once NM-openswan plugin is ready same behaviour will be observed. 

Without NM, Openswan (or vpnc too for that matter) will require looking inside /etc/resolv.conf to find out what is configured there as nameservers to obtain information about DNS servers.
Comment 4 Matěj Cepl 2010-05-18 11:57:24 EDT
well, there are long issues with vpnc and its script for generating /etc/resolv.conf (some people ended up with chattr +i /etc/resolv.conf and local bind to make DNS working well). However, the result why it doesn't bother me that much is that when vpnc finishes (killall vpnc), original /etc/resolv.conf gets correctly restored. Not so with ipsec so far.
Comment 5 Avesh Agarwal 2010-05-18 12:52:26 EDT
Openswan restores the /etc/resolv.conf correctly if one stops it by doing: 

service ipsec stop

However, if Openswan (ipsec) crahses (due to some issues) then it does not restore the /etc/resolv.conf . So are you referring the case when Openswan crashes?
Comment 6 Matěj Cepl 2010-05-19 03:42:39 EDT
(In reply to comment #5)
> Openswan restores the /etc/resolv.conf correctly if one stops it by doing: 
> 
> service ipsec stop
> 
> However, if Openswan (ipsec) crahses (due to some issues) then it does not
> restore the /etc/resolv.conf . So are you referring the case when Openswan
> crashes?    

Not only, probably due to some SELinux issues, I don't get /etc/resolv.conf restored even when I run ipsec setup stop.
Comment 7 RHEL Product and Program Management 2010-06-07 12:14:16 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 14 releng-rhel@redhat.com 2010-11-11 09:52:13 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.