On Fri, 11 Jul 2008, Arun Khan wrote:
On Wednesday 09 Jul 2008, Dr. Sharukh K. R. Pavri. wrote:
I now want to connect my laptop to the net thru the broadband modem via the wifi.
Your wording is confusing. If the broadband modem is connected to the PC then the PC is acting as the gateway. The laptop the PC is router,
sorry -- let me clarify: the pc has eth0 that connects to a cable modem. The pc _also_ has a wlan0.
I managed to get the laptop talking to the kubuntu machine and I can even browse the net on the laptop.
Hmm. implies packet from 192.168.0.x are being forwarded and NAT'd.
The problem is that I have lost internet connectivity on the kubuntu machine :( . No ping, no web access, zilch.
Strange. What is the exact error message? Are you pinging by hostname or IP address? What are the entries in /etc/resolv.conf?
I am pinging by hostname. After running the commands, the error is
ping: unknown host www.yahoo.com
if I ping by IP address
sharukh@natrum:~$ ping -c5 87.248.113.14 PING 87.248.113.14 (87.248.113.14) 56(84) bytes of data. ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted
--- 87.248.113.14 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 3999ms -------------------------------------------------------- /etc/resolv.conf shows the hathway dns servers (three of them)
On the PC what is the output of:
$host -t ns yahoo.com
before runing the iptables command -------------------------------------- sharukh@natrum:~$ host -t ns yahoo.com yahoo.com name server ns3.yahoo.com. yahoo.com name server ns4.yahoo.com. yahoo.com name server ns5.yahoo.com. yahoo.com name server ns6.yahoo.com. yahoo.com name server ns8.yahoo.com. yahoo.com name server ns1.yahoo.com. yahoo.com name server ns2.yahoo.com. --------------------------------------
after iptables command
sharukh@natrum:~$ host -t ns yahoo.com ;; connection timed out; no servers could be reached ----------------------------------------
so yes, a dns problem. but how do I fix this ? As I said, a network restart solves this probelm but then the laptop loses connectivity. :(
I have the follwoing setup:
modem <-> (pub.lic.I.P) PC <-> wifi (192.168.1.202) <-> (192.168.1.204) laptop
Looks like you have the modem in "Bridge" mode. Your PC is visible on the 'Net. I suggest you put it in router mode and use the router as the gateway. This will protect your PC via the NAT'd firewall and you will not have to put in any iptables rules for eth0.
It's a cable modem. I tried to open http://10.40.0.1/ but no luck. That address is the first hop on traceroute.
I've changed it to
route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.1.202
You can simplify the above with the following:
# route add default gw 192.168.1.202
on your laptop and other systems.
ok, will do that.
Me suspect you have a DNS problem on your PC 'cuz your laptop is able to connect (thru the PC) to websites and get responses back.
-- Arun Khan -- http://mm.glug-bom.org/mailman/listinfo/linuxers