X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.wtbts.no (mail.wtbts.no [213.234.126.131]) by mail.alpinelinux.org (Postfix) with ESMTP id 6514EDC1511 for ; Fri, 23 Dec 2011 23:27:05 +0000 (UTC) Received: from localhost (bsna.nor.wtbts.net [127.0.0.1]) by mail.wtbts.no (Postfix) with ESMTP id 3C47FAE4001; Fri, 23 Dec 2011 23:27:04 +0000 (UTC) X-Virus-Scanned: Yes Received: from mail.wtbts.no ([127.0.0.1]) by localhost (bsna.nor.wtbts.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N+vbwnheRygR; Fri, 23 Dec 2011 23:27:01 +0000 (UTC) Received: from mail.ytre.org (extmail.nor.wtbts.net [10.65.72.14]) by mail.wtbts.no (Postfix) with ESMTP id 22DC8376267; Fri, 23 Dec 2011 23:27:01 +0000 (UTC) Received: from mail.ytre.org (localhost [127.0.0.1]) by mail.ytre.org (Postfix) with ESMTP id CF18860AF5701; Fri, 23 Dec 2011 23:27:00 +0000 (UTC) Received: from localhost (unknown [10.65.96.20]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ncopa@ytre.org) by mail.ytre.org (Postfix) with ESMTPSA id 841E960A838CD; Fri, 23 Dec 2011 23:27:00 +0000 (UTC) Date: Sat, 24 Dec 2011 00:27:07 +0100 From: Natanael Copa To: Mohsen Ahmadian Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] getway pppoe alpine Message-ID: <20111224002707.501ce3a6@alpinelinux.org> In-Reply-To: References: X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; i686-pc-linux-gnu) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 23 Dec 2011 20:23:01 +0330 Mohsen Ahmadian wrote: > Hello to all > Iam new in alpine . i run pppoe on my alpine to create gateway .I > config all thing but i dont know what is wrong becuase when i ping to > 4.2.2.4 the result is true This means that the ip networking and routing works. > but I cant download any things or open any > http address in my client ( my clients can ping to 4.2.2.4 but cant > ping www.google.com or open any web address) This sounds like DNS resolving does not work. Can you ping www.google.com from the alpine linux gateway box? What is the contents of /etc/resolv.conf? You might check is "usepeerdns" is set for pppd (in either /etc/ppp/options or /etc/ppp/peers/*) If your ISP does not provide you with any DNS you could use opendns, google or run your own resolver (like dnscache or unbound) > *Please Help me* You might be interested in dnsmasq to provide dhcp and dns to your clients. > thx > > The configuration of my alpine (my host name is atom) > > > atom:~# iptables -L > Chain INPUT (policy ACCEPT) > target prot opt source destination > ACCEPT all -- anywhere anywhere state > RELATED,ESTABLISHED > > Chain FORWARD (policy ACCEPT) > target prot opt source destination > ACCEPT all -- anywhere anywhere state > RELATED,ESTABLISHED > ACCEPT all -- anywhere anywhere > REJECT all -- anywhere anywhere > reject-with icmp-port-unreachable > > Chain OUTPUT (policy ACCEPT) > target prot opt source destination > ------------------------------------------------------------------------------------------- > atom:~# pppoe-connect > Using interface ppp0 > Connect: ppp0 <--> /dev/pts/1 > PAP authentication succeeded > Cannot determine ethernet address for proxy ARP > local IP address 188.159.41.109 > remote IP address 89.165.100.200 > ^C > ------------------------------------------------------------------------------------------- > atom:~# netstat -nr > Kernel IP routing table > Destination Gateway Genmask Flags MSS Window > irtt Iface > 0.0.0.0 0.0.0.0 0.0.0.0 U 0 > 0 0 ppp0 > 89.165.100.200 0.0.0.0 255.255.255.255 UH 0 > 0 0 ppp0 > 192.168.0.0 0.0.0.0 255.255.255.0 U 0 > 0 0 eth0 > atom:~# route > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref > Use Iface > default * 0.0.0.0 U 0 0 > 0 ppp0 89.165.100.200 * 255.255.255.255 UH 0 > 0 0 ppp0 192.168.0.0 * 255.255.255.0 U > 0 0 0 eth0 > ------------------------------------------------------------------------------------------- > atom:~# sysctl -p net.ipv4.ip_forward = 1 > net.ipv4.tcp_syncookies = 1 > net.ipv4.conf.default.rp_filter = 1 > net.ipv4.conf.all.rp_filter = 1 > net.ipv4.conf.all.proxy_arp = 1 > kernel.panic = 120 > ------------------------------------------------------------------------------------------- > atom:~# cat /etc/network/interfaces > auto lo > iface lo inet loopback > > auto eth0 > iface eth0 inet static > netmask 255.255.255.0 > broadcast 192.168.0.255 > address 192.168.0.120 > network 192.168.0.0 > ------------------------------------------------------------------------------------------- > atom:~# ifconfig > eth0 Link encap:Ethernet HWaddr E0:69:95:90:85:39 > inet addr:192.168.0.120 Bcast:192.168.0.255 > Mask:255.255.255.0 inet6 addr: fe80::e269:95ff:fe90:8539/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:2418 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1767 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:214109 (209.0 KiB) TX bytes:416622 (406.8 KiB) > Interrupt:44 Base address:0xe000 > > eth1 Link encap:Ethernet HWaddr 14:D6:4D:A7:A2:5D > inet6 addr: fe80::16d6:4dff:fea7:a25d/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:255 errors:0 dropped:0 overruns:0 frame:0 > TX packets:131 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:22771 (22.2 KiB) TX bytes:8272 (8.0 KiB) > Interrupt:20 Base address:0x1000 > > 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:126 errors:0 dropped:0 overruns:0 frame:0 > TX packets:126 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:9462 (9.2 KiB) TX bytes:9462 (9.2 KiB) > > ppp0 Link encap:Point-to-Point Protocol > inet addr:188.159.41.109 P-t-P:89.165.100.200 > Mask:255.255.255.255 > UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 > RX packets:27 errors:0 dropped:0 overruns:0 frame:0 > TX packets:29 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:3 > RX bytes:2130 (2.0 KiB) TX bytes:3988 (3.8 KiB) > > ------------------------------------------------------------------------------------------- > atom:~# cat /etc/ppp/firewall-masq > /sbin/iptables -F > /sbin/iptables -t nat -F > /sbin/iptables -t mangle -F #ignore if you get an error here > /sbin/iptables -X #deletes every non-builtin chain in the table > > /sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT > #/sbin/iptables -A INPUT -m state --state NEW -i ppp0 -j ACCEPT > # only if both of the above rules succeed, use > /sbin/iptables -P INPUT ACCEPT > > /sbin/iptables -A FORWARD -i ppp0 -o eth0 -m state --state > ESTABLISHED,RELATED -j ACCEPT > /sbin/iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT > > /sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE > > /sbin/iptables -A FORWARD -i ppp0 -o ppp0 -j REJECT > ------------------------------------------------------------------------------------------- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---