<br><br><div class="gmail_quote">On Mon, Nov 29, 2010 at 1:16 PM, Tom H <span dir="ltr"><<a href="mailto:tomh0665@gmail.com">tomh0665@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

On Sun, Nov 28, 2010 at 7:15 AM, Kaushal Shriyan<br>
<div><div></div><div class="h5"><<a href="mailto:kaushalshriyan@gmail.com">kaushalshriyan@gmail.com</a>> wrote:<br>
> On Sun, Nov 28, 2010 at 4:55 PM, Tom H <<a href="mailto:tomh0665@gmail.com">tomh0665@gmail.com</a>> wrote:<br>
>> On Sun, Nov 28, 2010 at 1:34 AM, Kaushal Shriyan<br>
>> <<a href="mailto:kaushalshriyan@gmail.com">kaushalshriyan@gmail.com</a>> wrote:<br>
>> > On Sat, Nov 27, 2010 at 1:21 PM, Tom H <<a href="mailto:tomh0665@gmail.com">tomh0665@gmail.com</a>> wrote:<br>
>> >> On Fri, Nov 26, 2010 at 9:08 PM, Kaushal Shriyan<br>
>> >> <<a href="mailto:kaushalshriyan@gmail.com">kaushalshriyan@gmail.com</a>> wrote:<br>
>> >> ><br>
>> >> > I have three Internet Service Provider to connect to internet from my<br>
>> >> > laptop<br>
>> >> > running Ubuntu Desktop Linux OS 10.04<br>
>> >> > For example ISP A, ISP B ISP C<br>
>> >> > ISP A  --> is the Office Network (when i am in office )<br>
>> >> > ISP B -->  is the Mobile Broadband Network (when i am moving )<br>
>> >> > ISP C --> is the Home Network (when i am at home)<br>
>> >> > Also in addition to the above details :-<br>
>> >> > I have local DNS Server at office, DNS server of Data Center 1 and<br>
>> >> > DNS<br>
>> >> > Server of Data Center 2. so whenever i am in office, by default i<br>
>> >> > need<br>
>> >> > to<br>
>> >> > connect to these<br>
>> >> > three DNS Servers in order to access the servers.<br>
>> >> > The steps i have followed after using resolvconf<br>
>> >> > sudo apt-get install resolvconf<br>
>> >> > sudo rm /etc/resolv.conf<br>
>> >> > sudo ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf<br>
>> >> > sudo vim /etc/openvpn/update-resolv-conf<br>
>> >> ><br>
>> >> > Add the following lines in the beginning.<br>
>> >> ><br>
>> >> > foreign_option_1='dhcp-option DOMAIN <a href="http://off.example.com" target="_blank">off.example.com</a> <a href="http://dc1.example.com" target="_blank">dc1.example.com</a><br>
>> >> > <a href="http://dc2.example.com" target="_blank">dc2.example.com</a>'<br>
>> >> > foreign_option_2='dhcp-option DNS 172.26.0.1'<br>
>> >> > foreign_option_3='dhcp-option DNS 10.20.0.1'<br>
>> >> > foreign_option_4='dhcp-option DNS 10.20.0.2'<br>
>> >> > foreign_option_5='dhcp-option DNS 10.30.0.1'<br>
>> >> > save and exit<br>
>> >> > Add the below two lines at the bottom of the file openvpn client<br>
>> >> > DC1.conf<br>
>> >> ><br>
>> >> > up /etc/openvpn/update-resolv-conf<br>
>> >> > down /etc/openvpn/update-resolv-conf<br>
>> >> > The issue which i am facing is that I am unable to resolve the local<br>
>> >> > DNS<br>
>> >> > Servers at office. I need the local DNS Server in order to access<br>
>> >> > Network<br>
>> >> > printers<br>
>> >> > and other devices.<br>
>> >> > Office DNS Server is <a href="http://off.example.com" target="_blank">off.example.com</a> and DNS Server IP is 172.26.0.1<br>
>> >><br>
>> >> Are all five options above for your office network?<br>
>> ><br>
>> > Not sure i understand that ?<br>
>> >><br>
>> >> Please post "cat /etc/resolv.conf" after you connect to your office<br>
>> >> network.<br>
>> ><br>
>> > cat /etc/resolv.conf in my Ubuntu Laptop Desktop PC running 10.04<br>
>> > search <a href="http://off.example.com" target="_blank">off.example.com</a>  ### office<br>
>> > search <a href="http://dc1.example.com" target="_blank">dc1.example.com</a> ### DataCenter No.1<br>
>> > search <a href="http://dc2.example.com" target="_blank">dc2.example.com</a>' ### DataCenter No. 2<br>
>> > DNS 172.26.0.1<br>
>> > DNS 10.20.0.1<br>
>> > DNS 10.20.0.2<br>
>> > DNS 10.30.0.1<br>
>><br>
>> This "resolv.conf" is incorrect.<br>
>><br>
>> The "DNS" lines don't mean anything. It shouldn't be "DNS" but<br>
>> "nameserver".<br>
><br>
</div></div><div class="im">> sorry there was a typo, it is actually nameserver<br>
><br>
>> The "search" lines don't make sense (although I could be wrong). I<br>
>> don't use "search" but I'd expect your "resolv.conf" to have one<br>
>> search line "search <a href="http://example.com" target="_blank">example.com</a>" with your domain and not three with<br>
>> boxes.<br>
><br>
> search <a href="http://off.example.com" target="_blank">off.example.com</a>  ### office<br>
> search <a href="http://dc1.example.com" target="_blank">dc1.example.com</a> ### DataCenter No.1<br>
> search <a href="http://dc2.example.com" target="_blank">dc2.example.com</a>' ### DataCenter No. 2<br>
> nameserver 172.26.0.1<br>
> nameserver 10.20.0.1<br>
> nameserver 10.20.0.2<br>
> nameserver 10.30.0.1<br>
> Are you saying it should be as below  :-<br>
> foreign_option_1='dhcp-option DOMAIN <a href="http://off.example.com" target="_blank">off.example.com</a>' ### office<br>
> foreign_option_2='dhcp-option DOMAIN <a href="http://dc1.example.com" target="_blank">dc1.example.com</a>' ### DataCenter No.1<br>
> foreign_option_3='dhcp-option DOMAIN <a href="http://dc2.example.com" target="_blank">dc2.example.com</a>' ### DataCenter No.2<br>
> foreign_option_4='dhcp-option DNS 172.26.0.1' ### office<br>
> foreign_option_5='dhcp-option DNS 10.20.0.1'  ### DataCenter No.1<br>
> foreign_option_6='dhcp-option DNS 10.20.0.2'  ### DataCenter No.1<br>
> foreign_option_7='dhcp-option DNS 10.30.0.1'  ### DataCenter No.2<br>
>><br>
>> (I'd asked whether the five "foreign_option_X" were for your three<br>
>> locations or just for your office.)<br>
><br>
> foreign_option_X was for the three locations viz office,data center 1 and<br>
> data center 2<br>
<br>
</div>OK for "nameserver".<br>
<br>
No, I wasn't suggesting the you spread the "search" values over three<br>
lines. I was curious as to how the script that's putting your<br>
"resolv.conf" together could distinguish between your locations. Since<br>
you only have your office DNS settings, it's not relevant.<br>
<br>
I'm still not clear on "search <a href="http://off.example.com" target="_blank">off.example.com</a> <a href="http://dc1.example.com" target="_blank">dc1.example.com</a><br>
<a href="http://dc2.example.com" target="_blank">dc2.example.com</a>". Are <a href="http://off.example.com" target="_blank">off.example.com</a>, <a href="http://dc1.example.com" target="_blank">dc1.example.com</a>,<br>


<a href="http://dc2.example.com" target="_blank">dc2.example.com</a> subdomains of <a href="http://example.com" target="_blank">example.com</a> or servers? For example, I'd<br>
assumed that "dcX..." referred to AD DCs.<br>
<br>
Is a host, whose short name is "box", in your office called<br>
"<a href="http://box.off.example.com" target="_blank">box.off.example.com</a>" or "<a href="http://box.example.com" target="_blank">box.example.com</a>"?<br>
<br>
Since your "resolv.conf" is correct, assuming that you've used the<br>
correct DNS server ip addresses, what happens when you run a DNS<br>
query?<br>
<br>
What's the output of<br>
grep hosts /etc/nsswitch.conf<br>
dig +trace office_server<br>
dig +trace +nosearch office_server<br>
<div><div></div><div class="h5"><br>
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
</div></div></blockquote></div><br>Hi Tom<br><br>kaushal@kaushal-laptop:~$ grep hosts /etc/nsswitch.conf<br>hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4<br>kaushal@kaushal-laptop:~$ dig +trace 172.26.0.1<br>

<br>; <<>> DiG 9.7.0-P1 <<>> +trace 172.26.0.1<br>;; global options: +cmd<br>;; connection timed out; no servers could be reached<br>kaushal@kaushal-laptop:~$ dig +trace +nosearch 172.26.0.1<br><br>

; <<>> DiG 9.7.0-P1 <<>> +trace +nosearch 172.26.0.1<br>;; global options: +cmd<br>;; connection timed out; no servers could be reached<br>kaushal@kaushal-laptop:~$ping  172.26.0.1<br>PING 172.26.0.1 (172.26.0.1) 56(84) bytes of data.<br>

64 bytes from <a href="http://172.26.0.1">172.26.0.1</a>: icmp_seq=1 ttl=64 time=2.96 ms<br>64 bytes from <a href="http://172.26.0.1">172.26.0.1</a>: icmp_seq=2 ttl=64 time=0.137 ms<br>64 bytes from <a href="http://172.26.0.1">172.26.0.1</a>: icmp_seq=3 ttl=64 time=0.142 ms<br>

^C<br>--- 172.26.0.1 ping statistics ---<br>3 packets transmitted, 3 received, 0% packet loss, time 2000ms<br>rtt min/avg/max/mdev = 0.137/1.081/2.966/1.332 ms<br>kaushal@kaushal-laptop:~$netstat -r | grep -w default<br>
default         172.26.0.1    0.0.0.0         UG        0 0          0 eth0<br>
kaushal@kaushal-laptop:~$host <a href="http://off.example.com">off.example.com</a><br><a href="http://off.example.com">off.example.com</a> has address publicIP<br>kaushal@kaushal-laptop:~$<br><br>I dont know why <a href="http://off.example.com">off.example.com</a> resolves to my External Outgoing Public IP and not Internal LAN Gateway IP.<br>

<br>Please suggest/further.<br><br>Thanks and Regards<br><br>Kaushal<br><br><br>