DNS via VPN not working inside guest Linux

Discussion in 'Linux Virtual Machine' started by PerryC, Jul 20, 2009.

  1. PerryC

    PerryC Bit poster

    Messages:
    2
    I am running Parallels 4 with RHEL 5 32-bit as my guest OS. I have a corporate VPN running on the host Mac OS X and am attempting to get the host OS to see the VPN network. My Network Adapter is in "Shared" mode.

    The problem seems to be DNS. If I resolve the IP address in the host OS and use the numeric address in the guest OS, then things like ssh work fine. However, if I use the symbolic/string name (with ping or ssh for example), then things do not work.

    On the Mac:
    perry-chengs-macbook-pro:~ perry$ /sbin/ifconfig -a
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
    inet 127.0.0.1 netmask 0xff000000
    inet6 ::1 prefixlen 128
    gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    stf0: flags=0<> mtu 1280
    en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 00:23:32:c6:90:d2
    media: autoselect status: inactive
    supported media: none autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,flow-control> 10baseT/UTP <full-duplex,hw-loopback> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,flow-control> 100baseTX <full-duplex,hw-loopback> 1000baseT <full-duplex> 1000baseT <full-duplex,flow-control> 1000baseT <full-duplex,hw-loopback>
    en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    inet6 fe80::223:12ff:fe53:fafc%en1 prefixlen 64 scopeid 0x5
    inet6 2002:62d8:69f3::223:12ff:fe53:fafc prefixlen 64 autoconf
    inet 10.0.1.154 netmask 0xffffff00 broadcast 10.0.1.255
    ether 00:23:12:53:fa:fc
    media: autoselect status: active
    supported media: autoselect
    wc2: flags=863<UP,BROADCAST,SMART,RUNNING,SIMPLEX> mtu 1448
    inet 9.12.233.160 netmask 0xff000000 broadcast 9.255.255.255
    ether 00:02:55:11:19:76
    media: 1000baseT (<unknown type>)
    supported media: autoselect 1000baseT
    fw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 4078
    lladdr 00:23:32:ff:fe:c6:90:d2
    media: autoselect <full-duplex> status: inactive
    supported media: autoselect <full-duplex>
    en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    inet6 fe80::21c:42ff:fe00:8%en3 prefixlen 64 scopeid 0x8
    inet 10.211.55.2 netmask 0xffffff00 broadcast 10.211.55.255
    ether 00:1c:42:00:00:08
    media: autoselect status: active
    supported media: autoselect
    en4: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    inet6 fe80::21c:42ff:fe00:9%en4 prefixlen 64 scopeid 0x9
    inet 10.37.129.2 netmask 0xffffff00 broadcast 10.37.129.255
    ether 00:1c:42:00:00:09
    media: autoselect status: active
    supported media: autoselect


    On the guest OS (Linux):
    eth0 Link encap:Ethernet HWaddr 00:1C:42:9F:51:04
    inet addr:10.211.55.5 Bcast:10.211.55.255 Mask:255.255.255.0
    inet6 addr: fe80::21c:42ff:fe9f:5104/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:160 errors:0 dropped:0 overruns:0 frame:0
    TX packets:164 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:21080 (20.5 KiB) TX bytes:20015 (19.5 KiB)
    Interrupt:10 Base address:0x8200

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:2050 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2050 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:4144248 (3.9 MiB) TX bytes:4144248 (3.9 MiB)

    sit0 Link encap:IPv6-in-IPv4
    NOARP MTU:1480 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
     
  2. Elric

    Elric Parallels Team

    Messages:
    1,712
    may be this will help: quote from http://forum.parallels.com/showpost.php?p=377338&postcount=2

    "About problems with dns.. there is an issue in the current Parallels Desktop with DNS and VPN. It can be workarounded: it is required to manually add the DNS-server for VPN-related sites to the Network Connection. Please try to go to the Control Panel -> Network Connections, right-click proper connection (most likely there is the only one 'Local Area Connection') and choose properties, then select TCP/IP -> Properties and select manual configuration for DNS ("Use the following DNS server addresses). Make your preffered DNS server be your corporate dns-server. As Alternate - enter "10.211.55.1".

    If you don't know your corporate DNS-server, run the Mac-terminal (/Application/Utilities/Terminal) and enter the next command "sudo scutil --dns". This (assuming that VPN sites are accessible from Mac) should output list of DNS-servers."

    So, steps to workaround this on linux might be
    1. do "scutil --dns" on mac and determine VPN's dns server

    2. edit /etc/resolver.conf on linux and either add (I don't know details of RHEL DNS Resolver implementation, so don't know whether it is possible to add second dns-server) VPNs dns-server before 10.211.55.1, or replace 10.211.55.1 with your dns-server. I've heard some rumors that some linux-users have two resolv.conf and do switching between them manually
    # vim /etc/resolv.conf
     

Share This Page