I'm trying to set up an old P166 laptop to act as a wireless access
point in my apartment. I've got it running RH8.0 with iptables.
Everything's working, except that DNS lookups seem to take forever.
If I ping a hostname, the numbers returned by ping are reasonable
(~10ms) but it actually takes a few seconds to return each ping reply.
If I ping the corresponding IP address however, it operates smoothly.
On the web browser front, I can browse a few simple webpages that
don't have many links (google works ok) - but if the page contains a
lot of links made up of hostnames (like ebay.com), it gets nowhere
fast.
My setup is as follows (a little screwy): I've got a cable modem
hooked into a D-Link DI-604 broadband NAT. This router assigns DHCP
addresses in the 192.168.0.x range to all wired hosts. Then I've got
the old laptop set up with a wired interface (eth1 - 192.168.0.102)
and a wireless interface (eth0 - manually configured to 10.20.30.1,
set in ad-hoc mode, and all wireless clients are in the 10.20.30.x
subnet in ad-hoc mode as well). The laptop is set up to do ip
masquerading using iptables, and my iptables script is shown below
(all the lines that I have commented out, I've tried at some point
with no success). You'll notice the iptables script is fairly loose -
I'm not too worried about setting up a firewall since my D-Link NAT
already has one built in (which shouldn't be blocking any DNS).
I'm not sure if my problem lies in the iptables configuration, or if I
need to do something to /etc/resolv.conf on either the laptop NAT or
the wireless clients. I've tried a wireless windows client as well as
a wireless linux client, and both are extremely slow at loading most
webpages due to the DNS slowdown (I think).
Any ideas?
Jon
#####################
#/bin/bash
iptables -F
iptables -t nat -F
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source
192.168.0.102
# iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i eth1 -p ICMP -j ACCEPT
# 204.127.198.19 and 63.240.76.19 are my ISP's DNS servers
# iptables -A INPUT -i eth1 -p tcp -s 204.127.198.19 --sport 53 -j
ACCEPT
# iptables -A INPUT -i eth1 -p tcp -s 63.240.76.19 --sport 53 -j
ACCEPT
# iptables -A INPUT -i eth1 -p udp -s 204.127.198.19 --sport 53 -j
ACCEPT
# iptables -A INPUT -i eth1 -p udp -s 63.240.76.19 --sport 53 -j
ACCEPT
#####################