I am working from home using Ubuntu 11.04 on my workstation. VPN connection is always turned on in order to reach services on the VPN network and VPN specific DNS information should be available in the resolv.conf file. But in that case, queries for public domains will also be sent to the DNS on VPN.
In order to separate DNS queries for VPN and internet, you need to use "dnsmasq" as a dns forwarder and set it to use DNS on VPN for only specific domain(s).
Setting up "dnsmasq" is pretty easy(for a regular linux user). You just install "dnsmasq" package and then set the following options in its configuration file.
/etc/dnsmasq.conf:
resolv-file=/etc/resolv.conf.public
server=/corp.mycompany.com/10.0.0.1
Here "10.0.0.1" is the DNS server that will be used for all domains in "corp.mycompany.com". You may need to learn it from the IT department of your company.
In addition you need to place your regular resolv.conf file in /etc/resolv.conf.public and set the first nameserver to 127.0.0.1 in /etc/resolv.conf. To do so, dhclient hooks are useful. They are supposed to be executed upon dhcp operations. So, you can update /etc/resolv.conf.public file to point the nameserver obtained from DHCP server.
For the latest Ubuntu distributions these hooks are disabled and you need a workaround to get them. (Thanks to Andy Thomspon for the workaround http://andytson.com/blog/2009/03/workaround-so-networkmanager-runs-dhclient-hooks/)
Here are the steps customized for that purposes:
1. open /etc/dhcp/dhclient.conf file with write permission and set/modify the following options as follows:
prepend domain-name-servers 127.0.0.1;
script "/etc/dhcp/dhclient-script";
2. Download the script "dhclient-script" and place it in /etc/dhcp
3. Make the script executable:
sudo chmod +x /etc/dhcp/dhclient-script
4. Create a new hook file at /etc/dhcp/dhclient-enter-hooks.d/update_public_dns and add the following line:
cat /etc/resolv.conf | grep -v 127.0.0.1 > /etc/resolv.conf.public
Now, you should be ready to test:
sudo service dnsmasq restart
sudo service network-manager restart
PS: Adding "search" option in resolv.conf will allow you to reach hostnames defined on VPN without entering the domain name. Ex: search corp.mycompany.com
1 Ağustos 2011
25 Ağustos 2010
Gnome'da KDE Fontları / KDE Fonts in Gnome
Bu sorunu her linux yüklememde yaşarım.
KDE uygulamalarının fontları gnome'da düzgün gözükmez.
Bu konuda bulduğum en güncel çözüm aşağıdaki forum mesajına göre
http://www.linuxquestions.org/questions/debian-26/kde4-style-apps-in-gnome-squeeze-text-problem-737275/
"systemsettings" paketinin kurulup font ayarlarını düzeltmek. LCD ekranlar için geliştirilmiş "Alias" özelliğini oldum olası sevmedim. Köşeleri kırpık fontları daha çok seviyorum. Astigmat olmamın da bunda etkisi olabilir :)
KDE uygulamalarının fontları gnome'da düzgün gözükmez.
Bu konuda bulduğum en güncel çözüm aşağıdaki forum mesajına göre
http://www.linuxquestions.org/questions/debian-26/kde4-style-apps-in-gnome-squeeze-text-problem-737275/
"systemsettings" paketinin kurulup font ayarlarını düzeltmek. LCD ekranlar için geliştirilmiş "Alias" özelliğini oldum olası sevmedim. Köşeleri kırpık fontları daha çok seviyorum. Astigmat olmamın da bunda etkisi olabilir :)
17 Aralık 2009
18 Ekim 2009
Half Moon Bay ve Santa Cruz Dağları Ziyaretleri
Pumpkin Patch and Ocean View @ Half Moon Bay & Wine Testing @ Santa Cruz Mountains
30 Eylül 2009
21 Eylül 2009
Kaydol:
Kayıtlar (Atom)