Re: dnsmasq for caching, now: fedora wireless "out of the box"
by kwhiskerz
Thanks for suggestions. At present, my machines are separate. I have to unplug
the router from the one machine, carry it into the other room, plug it in and
boot. The machines don't talk to eachother. I use the second computer only to
watch DVDs in the bedroom.
Any ideas, anyone, while on the networking topic, what wireless cards work
with fedora?
I read an article on the web that said that there are some wireless network
cards that work with fedora "out of the box". I bought one about a month ago,
some kind of d-link pci card, spent an entire evening with ath0 and madwifi
and friends, and finally gave up in utter frustration and returned the thing
to the store. I want something I can just plug in "out of the box".
My ISP provides me with a DSL router that supports wireless, so my main
computer is attached to the wire and the second would be wireless. Both would
be connected, then, to the router and through the router to the internet, but
not connected to each other.
16 years, 5 months
Re: dnsmasq for caching
by Mike Chambers
On Sun, 2007-11-18 at 15:12 -0700, kwhiskerz wrote:
> This is what I have done:
>
> I have made a file, resolv.servers with the nameservers I want to use. I have
> edited resolv.conf so that it looks at 127.0.0.1. I have put PEERDNS=no into
> ifcfg-eth0 so that resolv.conf does not get overwritten at boot. I have
> edited dnsmasq.conf to use only resolv.servers in strict order.
>
> I am able to connect to the internet and I can verify that I am using my
> chosen nameservers, so this setup appears to be working.
I know you mentioned in another reply to your original post that it was
working and performing a lot faster. But what I want to mention, is you
could do this as well..
1 - Setup dnsmasq on one of your machines, mainly a server type or
something?
2 - Setup your other machines to point to that one machine running
dnsmasq, as the dns server.
3 - May not need to do this, but I also put the ips/hostnames in the one
machine that is running dnsmasq, which will also let the other machines
perform local dns'ing a lot faster, especially if your internet goes
down.
Ways I do it above might not be correct, but that is how I been doing it
for the last few years when I first needed something like this and
learned about dnsmasq at the time.
Hope it works for you as well as me,
--
Mike Chambers
Madisonville, KY
"The best lil town on Earth!"
16 years, 5 months
Re: dnsmasq for caching
by kwhiskerz
Yes, caching is working. I don't know what happened, but all of a sudden both
machines show 0ms! Perhaps it takes dnsmasq a while to load it's
configuration file, despite a restart? Who knows, but I think it is solved.
I had a look at tcpdump and I don't know if I could make sense of the output.
Perhaps with a bit of reading to figure out what it means.
16 years, 5 months
Re: dnsmasq for caching
by John Summerfield
kwhiskerz wrote:
> This is what I have done:
>
> I have made a file, resolv.servers with the nameservers I want to use. I have
> edited resolv.conf so that it looks at 127.0.0.1. I have put PEERDNS=no into
> ifcfg-eth0 so that resolv.conf does not get overwritten at boot. I have
> edited dnsmasq.conf to use only resolv.servers in strict order.
>
> I am able to connect to the internet and I can verify that I am using my
> chosen nameservers, so this setup appears to be working.
>
> I have set up 2 computers and have exactly the same files in both.
>
> On one computer, when I type dig someplace.com the search takes ~300ms and
> subsequently ~0ms and no lights flash on my adsl router. Caching appears to
> work.
>
> On the other computer, when I type dig someplace.com the search takes ~300ms
> and subsequently ~35ms and lights flash on my adsl router. I suspect caching
> is not working.
>
> What is happening here? How does one properly set up dnsmasq to do dns
> caching? Why is the same setup acting differently on the 2 machines? Network
> Manager is not enabled on either machine.
>
> Any ideas?
>
Seems to me caching _is_ working, though why the difference I cannot say.
Use tcpdump* to listen to the relevant interface, port 53 on each and
see what's the difference.
* Or wireshark. Wireshark has a nice GUI.
--
Cheers
John
-- spambait
1aaaaaaa(a)coco.merseine.nu Z1aaaaaaa(a)coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375
Please do not reply off-list
16 years, 5 months
dnsmasq for caching
by kwhiskerz
This is what I have done:
I have made a file, resolv.servers with the nameservers I want to use. I have
edited resolv.conf so that it looks at 127.0.0.1. I have put PEERDNS=no into
ifcfg-eth0 so that resolv.conf does not get overwritten at boot. I have
edited dnsmasq.conf to use only resolv.servers in strict order.
I am able to connect to the internet and I can verify that I am using my
chosen nameservers, so this setup appears to be working.
I have set up 2 computers and have exactly the same files in both.
On one computer, when I type dig someplace.com the search takes ~300ms and
subsequently ~0ms and no lights flash on my adsl router. Caching appears to
work.
On the other computer, when I type dig someplace.com the search takes ~300ms
and subsequently ~35ms and lights flash on my adsl router. I suspect caching
is not working.
What is happening here? How does one properly set up dnsmasq to do dns
caching? Why is the same setup acting differently on the 2 machines? Network
Manager is not enabled on either machine.
Any ideas?
16 years, 5 months
Re: Please 'leak' Fedora 8
by Mike Chambers
On Wed, 2007-11-07 at 09:18 +1030, Tim wrote:
> If you like the idea of a permanent address, never having to tell
> friends to contact you on a new one, etc., then register your own
> domain
> name, and pick any company that you like to host your mail (and any
> other services you want). And if they begin to suck, you can pick up
> your bat and ball and go somewhere else, and still use your own domain
> name and e-mail addresses.
>
> It's well worth it, there's any number of hosting services that are
> reasonably priced. And, as their business is purely hosting, they can
> be a lot better at it than ISPs, many of whom just care about getting
> money off you to provide a connection to the internet.
What I currently do, is have my domain registered via godaddy.com with
the dns pointing to dyndns.com.
At dyndns.com I have my domain name and aliases setup.
On my computer (or in this case, the server one), I have ddclient that
runs and checks for an IP every so often and reports it to dyndns.com.
And then I run a little program called dnsmasq to help resolve local
machines to run without having to resolve all the time and being slow.
Then I just setup my server machine to accept emails, web, ftp, etc.
And I run a linksys router between my cable modem and my computers.
Might not be the best way, but I basically pay per year for domain name
and dyndns service, maybe $30/year or so, give or take a few. But it
works and lets me keep on top of administering and not having to change
my emails all the time.
--
Mike Chambers
Madisonville, KY
"The best lil town on Earth!"
16 years, 6 months
Re: Iptables port 5353 -
by Mikkel
John Summerfield wrote:
>
> I prefer to use my own DNS server; it works better, and is more
> educational.
>
Well, I have run bind in the past. I have done a fair number of zone
files, and had the usual problems of forgetting to increment the
version number once or twice. Currently I am running dnsmasq and
letting it read the /etc/hosts file. For a home network, with few
computers, programs like dnsmasq are probably a better choice. It
can also function as a DHCP server, or read the leases file of a
"real" DHCP server.
Even though it is less educational, running a package that combines
a DHCP server and a DNS server, and lets you use simple config files
are probably a better idea for a home network. It gives you time to
explore other areas.
On the other hand, I actually enjoyed configuring bind, dhcpd, and
tftp. - I have even set up dhcp and Etherboot to use a second server
as the tftp server. At one of the LUG meetings, I brought along a
pre-configured server so we could boot Linux from the computers in a
computer lab without touching their hard drives. They could not boot
from the CD, but could do a PXE boot. (We could not access the BIOS,
but could do a network boot...)
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
16 years, 6 months
Re: DHCP & DNS [OT]
by John Summerfield
zephod(a)cfl.rr.com wrote:
> As promised, here are the results of my experiments on putting a DNS server on my Linksys router.
>
> After a little research I found the DD-WRT project (http://www.dd-wrt.com/) which looked like it would do what I wanted by using the DNS forwarder (DNSmasq) feature.
>
> A quick read of the documentation makes you very aware of the term "bricking" your router, ie flashing the router firmware incorrectly, thereby totally and possibly irrecoverably breaking it. So after a second, thorough read of the documentation, taking the precautions of noting all of the current settings of the router and copying the online instructions to local files, I sucessfully flashed the router with the mini version of the DD-WRT firmware. There are warnings about only using IE to upgrade from the original Linksys firmware. The warnings may be out of date now, but I heeded them anyway. Once the DD-WRT firmware is installed, any browser can be used for futher upgrades. I got a scare at first because I couldn't log in to the router after I had upgraded. Then I remembered, that DD-WRT uses root as the default login instead of nothing.
>
> Next, I configured the router according to my old settings and activated DNSmasq. Everything appeared to be working correctly. I could browse the internet from both my Fedora box and the Vista box. I could also ping the Vista box or the router from the Fedora box just by typing 'ping Vista' or ping DD-WRT.
>
> I did manage to screw someyhing up while I was feeling very pleased with myself and poking around the various screens. The router somehow lost the host name of my Fedora box and I could no longer ping myself. I tried restarting networking, rebooting the router and rebooting the Fedora box with no luck. Eventually, I was able to get it back by creating a dhclient.conf file and putting a send hostname clause it in. It still worked when I deleted the dhclient file, so I don't really know what was happening there.
>
> Now the only remaining problem was that the Windows box could not ping either itself, the router or the Fedora box. I found the answer in the DNSmasq FAQ. Apparently, Windows machines do not use DNS when looking up machine names that don't contain a '.', they just try to use WINS. This can be verified by typing 'ping my_local_machine' which will fail and 'ping my_loca_machine.' which suceeds. The solution is to set a domain name in the DHCP server and use the domain-required and expand-hosts options. The Windows machine must also be set up to use 'mydomain' DNS suffix for this connection. Now, when I type 'ping DD_WRT' from either the Fedora box or the Windows box, I get a response from host.mydomain. Here is the windows results:
>
> C:\> ping DD-WRT
>
> pinging DD-WRT.mydomain [192.168.1.1] with 32 bytes of data :
>
> Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
> Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
> Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
> Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
>
> Ping statistics for 192.168.1.1 :
> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
> Approximate round trip time in ms:
> Minimum = 1ms, Maximum = 1ms, Average = 1ms
>
> Now the only problem left, and it's not really a problem, just a curiousity, is that the Windows box cannot ping itself. I might try to update to the standard version of the firmware next weekend.
>
> If anybody would like more details, just let me know.
As one who has a Linksys wrt54g (one of those revisions that's
compatible) I'm very interested in this, and any more information you
can offer.
In particular, what can you do now that you couldn't before?
I've been sorely tempted to upgrade it to non-linksys firmware; one of
the problems I have is it tends to die under load, requiring a reset,
and if there's nobody around, a reset is fairly inconvenient.
>
> Steve
>
> ---- zephod(a)cfl.rr.com wrote:
>> It seems like the solution is to set up a local DNS server on the same machine as the the DHCP server. Some people suggested putting the DHCP server on the Fedora box but it is usually not on during the day which would be a problem for the Windows box which usually is. I'm going to do a little research and see if I can put a DNS server on the Linksys.
>>
>> Thanks to all who responded on this. I'll report back on my progress.
>>
>> Steve
>>
>> ---- Adalbert Prokop <adalbert.prokop(a)gmx.de> wrote:
>>> zephod(a)cfl.rr.com wrote on Sunday 21 October 2007:
>>>
>>>> Here is my simple and, I suspect, very common setup: 2 PCs, one FC6
>>>> Linux, one Windows Vista and a Linksys wireless router. A DHCP server
>>>> on the Linksys determines the IP addresses of the 2 machines.
>>>> My question is: is it possible for either machine to ping the other
>>>> without having to make an entry in its local hosts file?
>>> At least not only with DHCP. It is only for assigning IP addresses and
>>> parameters to network devices. If you want name-to-address resolving you
>>> need (an internal) DNS server. That could be your Linksys router. I don't
>>> know if the original firmware has a DNS server, but WRT54G is flashable.
>>> That means you can install a small Linux distro on it and within a DNS
>>> server (dnsmasq or bind or ...). Look here
>>>
>>> http://www.freewrt.org/trac/wiki/Documentation/TargetSystems
>>>
>>> If you cannot use a DNS server you could use Bonjour/Zeroconf for address
>>> resolving. Apples Bonjour is available for Windows and Linux has its own
>>> implementations of the mDNS (multicast DNS) protocoll, e.g. mDNSresponder
>>> or avahi. mDNS is simmilar to DNS but it does not need a central server
>>> because every machine is sending broadcast messages on the network
>>> announcing itself to its neighbours. With help of the nss-mdns package
>>> you can then resolve the broadcasted names to IP addresses.
>>>
>>> For a small office the DHCP/DNS solution is the preferable one.
>>>
>>> --
>>> bye,
>>> Adalbert
>
--
Cheers
John
-- spambait
1aaaaaaa(a)coco.merseine.nu Z1aaaaaaa(a)coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375
Please do not reply off-list
16 years, 6 months
Re: DHCP & DNS [OT]
by Steve Blackwell
As promised, here are the results of my experiments on putting a DNS server on my Linksys router.
After a little research I found the DD-WRT project (http://www.dd-wrt.com/) which looked like it would do what I wanted by using the DNS forwarder (DNSmasq) feature.
A quick read of the documentation makes you very aware of the term "bricking" your router, ie flashing the router firmware incorrectly, thereby totally and possibly irrecoverably breaking it. So after a second, thorough read of the documentation, taking the precautions of noting all of the current settings of the router and copying the online instructions to local files, I sucessfully flashed the router with the mini version of the DD-WRT firmware. There are warnings about only using IE to upgrade from the original Linksys firmware. The warnings may be out of date now, but I heeded them anyway. Once the DD-WRT firmware is installed, any browser can be used for futher upgrades. I got a scare at first because I couldn't log in to the router after I had upgraded. Then I remembered, that DD-WRT uses root as the default login instead of nothing.
Next, I configured the router according to my old settings and activated DNSmasq. Everything appeared to be working correctly. I could browse the internet from both my Fedora box and the Vista box. I could also ping the Vista box or the router from the Fedora box just by typing 'ping Vista' or ping DD-WRT.
I did manage to screw someyhing up while I was feeling very pleased with myself and poking around the various screens. The router somehow lost the host name of my Fedora box and I could no longer ping myself. I tried restarting networking, rebooting the router and rebooting the Fedora box with no luck. Eventually, I was able to get it back by creating a dhclient.conf file and putting a send hostname clause it in. It still worked when I deleted the dhclient file, so I don't really know what was happening there.
Now the only remaining problem was that the Windows box could not ping either itself, the router or the Fedora box. I found the answer in the DNSmasq FAQ. Apparently, Windows machines do not use DNS when looking up machine names that don't contain a '.', they just try to use WINS. This can be verified by typing 'ping my_local_machine' which will fail and 'ping my_loca_machine.' which suceeds. The solution is to set a domain name in the DHCP server and use the domain-required and expand-hosts options. The Windows machine must also be set up to use 'mydomain' DNS suffix for this connection. Now, when I type 'ping DD_WRT' from either the Fedora box or the Windows box, I get a response from host.mydomain. Here is the windows results:
C:\> ping DD-WRT
pinging DD-WRT.mydomain [192.168.1.1] with 32 bytes of data :
Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
Ping statistics for 192.168.1.1 :
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip time in ms:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
Now the only problem left, and it's not really a problem, just a curiousity, is that the Windows box cannot ping itself. I might try to update to the standard version of the firmware next weekend.
If anybody would like more details, just let me know.
Steve
---- zephod(a)cfl.rr.com wrote:
> It seems like the solution is to set up a local DNS server on the same machine as the the DHCP server. Some people suggested putting the DHCP server on the Fedora box but it is usually not on during the day which would be a problem for the Windows box which usually is. I'm going to do a little research and see if I can put a DNS server on the Linksys.
>
> Thanks to all who responded on this. I'll report back on my progress.
>
> Steve
>
> ---- Adalbert Prokop <adalbert.prokop(a)gmx.de> wrote:
> > zephod(a)cfl.rr.com wrote on Sunday 21 October 2007:
> >
> > > Here is my simple and, I suspect, very common setup: 2 PCs, one FC6
> > > Linux, one Windows Vista and a Linksys wireless router. A DHCP server
> > > on the Linksys determines the IP addresses of the 2 machines.
> >
> > > My question is: is it possible for either machine to ping the other
> > > without having to make an entry in its local hosts file?
> >
> > At least not only with DHCP. It is only for assigning IP addresses and
> > parameters to network devices. If you want name-to-address resolving you
> > need (an internal) DNS server. That could be your Linksys router. I don't
> > know if the original firmware has a DNS server, but WRT54G is flashable.
> > That means you can install a small Linux distro on it and within a DNS
> > server (dnsmasq or bind or ...). Look here
> >
> > http://www.freewrt.org/trac/wiki/Documentation/TargetSystems
> >
> > If you cannot use a DNS server you could use Bonjour/Zeroconf for address
> > resolving. Apples Bonjour is available for Windows and Linux has its own
> > implementations of the mDNS (multicast DNS) protocoll, e.g. mDNSresponder
> > or avahi. mDNS is simmilar to DNS but it does not need a central server
> > because every machine is sending broadcast messages on the network
> > announcing itself to its neighbours. With help of the nss-mdns package
> > you can then resolve the broadcasted names to IP addresses.
> >
> > For a small office the DHCP/DNS solution is the preferable one.
> >
> > --
> > bye,
> > Adalbert
16 years, 6 months
Re: DHCP & DNS
by Dr J Austin
On Sun, 2007-10-21 at 12:16 -1000, Dave Burns wrote:
> If you have 100 boxes, run DNS. Sounds like you want (?) static host
> names, might as well go for static IP too. Why not just make it all
> static if they know each other and make assumptions about each other.
>
> I just happen to know of an office with about 100 PCs in it, using NIS
> and NFS means they need a static relationship between machine and IP.
> (Well, again, it could be some other way but it is already complicated
> enough.) They have some hosts set with static IP, others get IP from
> DHCP but it is always the same (DHCP server config knows what IP
> belongs to what MAC address), and a small number of laptops share a
> pool of IPs and do not have predictable IP.
>
> Sounds to me like making everything totally dynamic is overkill in
> your current situation, and would be skull-crackingly complicated with
> 100 PCs that think they know a lot about each other. Maybe there is
> some applicable scale in between.
>
> Or just don't assume that any relationship is static, then everything
> can be dynamic.
>
> What would really make you happy? Some sort of peer-to-peer DNS
> without a server? Maybe you can use MAC addresses somehow?
> Dave
>
>
> On 10/21/07, zephod(a)cfl.rr.com <zephod(a)cfl.rr.com> wrote:
> >
> > ---- Dave Burns <tburns(a)hawaii.edu> wrote:
> > > My lazy ignorant suggestion is to reconfigure the router so that you
> > > know the IP of the two boxes will not change and then use /etc/hosts.
> >
> > Yes, I know I could do that. It's OK when there are only 2 boxes but what if I had a small office setup with, say, 100 PCs. It's not so practical then. I'm interested in finding out if there is another way to make this work.
> >
> > Steve
>
Hi
I have found DDNS a great advantage as I am adding machines/virtual
machines/Fx Test releases quite frequently - it is a joy to use.
It is behind a routing firewall and is hopefully reasonably secure.
I attach my hints to myself below.
Please do not ask about the IP addresses used - its too long
a story!!!!!!!!!!
I also see that dnsmasq is suitable and is used by xen virtual machines?
man dnsmasq
"dnsmasq is a lightweight DNS, TFTP and DHCP server. It is intended to
provide coupled DNS and DHCP service to a LAN." .....
John
16 years, 6 months