LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   pppoe internet can ping external IP,but resolving NAT DNS fails (https://www.linuxquestions.org/questions/debian-26/pppoe-internet-can-ping-external-ip-but-resolving-nat-dns-fails-510622/)

deepclutch 12-15-2006 02:51 AM

pppoe internet can ping external IP,but resolving NAT DNS fails
 
Hello,
I use Debian Etch,apt-pinned with unstable and experimental repos.yesterday onwards,when i try my adsl to connect,it shows connected.but when i try on my web browser (iceweasel2),or pinging www.linuxquestions.org,itfails,though i can ping IP addresses of any sites on www.
i tried/checked /etc/resolv.conf for dns server for ISP entries;it is there.checked firewall rules(iptables,tried flushing rules too).looked ifconfig for eth0 and lo and both are working with ppp0 as the internet connxn.i tried "route del default" and "route add default ppp0"-that also not able to solve my problem.So I assumed some problem with DNS server of ISP.But Now as I can Browse Internet with Ubuntu Edgy-it seems to me that My Debian Install have some problem resolving DNS,as well as NAT.so please Help!:)
Code:

prakash@ubuntu:~$ sudo ifconfig
Password:
eth0      Link encap:Ethernet  HWaddr 00:15:89:92:91:64 
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::214:85ff:fe98:9864/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:810 errors:0 dropped:0 overruns:0 frame:0
          TX packets:853 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:357523 (349.1 KiB)  TX bytes:118033 (115.2 KiB)
          Interrupt:201 Base address:0xc000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:100 (100.0 b)  TX bytes:100 (100.0 b)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:59.93.20.100  P-t-P:59.93.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:734 errors:0 dropped:0 overruns:0 frame:0
          TX packets:773 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:336733 (328.8 KiB)  TX bytes:96059 (93.8 KiB)


jschiwal 12-15-2006 04:07 AM

Post the output of your /sbin/route command. I'm wondering is you have a restrictive netmask which only allows changes in the last 2 or 3 octets.

deepclutch 12-15-2006 08:20 AM

Here is the o/p of route:
Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
59.93.0.1      *              255.255.255.255 UH    0      0        0 ppp0
localnet        *              255.255.255.0  U    0      0        0 eth0
default        *              0.0.0.0        U    0      0        0 ppp0


jschiwal 12-15-2006 05:17 PM

I think that the line for your gateway should look like:
Code:

default        59.93.0.1      0.0.0.0        UG    0      0        0 ppp0
I use a cable modem and have a NAT router, so I assign the router's IP address as the gateway Address ( "gw 192.168.1.1" in the route command ). The 255.255.255.255 netmask just looks bizarre to me, but it turns out to be correct. I'm glad I don't have DSL.

I think that you left out the "gw 59.93.0.1" argument to the route command. You need to delete your old default route and include the gateway argument when you setup the default gateway route.

deepclutch 12-17-2006 04:09 AM

suddenly dsl is up ?
 
I am working with my ubuntu for few days.so today only i checked debian for net.now it is working! SO...Self Healing power of Debian :scratch:
here is the o/p of /sbin/route
Code:

prakash@etch:~$ /sbin/route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
59.93.0.1      0.0.0.0        255.255.255.255 UH    0      0        0 ppp0
192.168.1.0    0.0.0.0        255.255.255.0  U    0      0        0 eth0
0.0.0.0        0.0.0.0        0.0.0.0        U    0      0        0 ppp0

anyways i've tinkered with my adsl router Huaewei MT 880 web interface @ 192.168.1.1

deepclutch 12-24-2006 10:44 AM

Solved.it is actually a problem with iptables.so removed and reinstalled.

fhleung 02-26-2008 08:16 AM

ip route
 
Quote:

I think that the line for your gateway should look like:

Code:

default        59.93.0.1      0.0.0.0        UG    0      0        0 ppp0

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:59.93.20.100  P-t-P:59.93.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:734 errors:0 dropped:0 overruns:0 frame:0
          TX packets:773 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:336733 (328.8 KiB)  TX bytes:96059 (93.8 KiB)


The following is the ip route output:
59.93.0.1 dev ppp0 proto kernel scope link src 59.93.20.100
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.2
169.254.0.0/16 dev eth0 scope link
127.0.0.0/8 dev lo scope link
default via 192.168.1.1 dev ppp0

line for gateway can be chaged by
ip route change default via address dev ppp0


The address should be the inet addr or P-t-P ? I am using a DSL modem. Please help.

deepclutch 02-28-2008 04:24 AM

^addr is inet . for ur thing,disable/remove "network-manager" if installed.p-t-p is the n/w range.

fhleung 02-29-2008 04:31 AM

Thanks for ur respond, u read very "carefully"


All times are GMT -5. The time now is 03:01 AM.