LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-16-2012, 01:07 AM   #1
shams
Member
 
Registered: Jan 2004
Posts: 535

Rep: Reputation: 30
The client machine of network cannot connect to the outside world?


The home network has two machines running debian, the server machine is working as gateway for the client the forward chain is enabled in the server, the server interface is ppp0 and eth0 and the client interface is eth1.
Now when ping the outside world this is the error:
Quote:
#ping google.com
ping: Unknown host google.com
when ping the local server that work
Quote:
#ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.209 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=1.23 ms
this is client machine connection information that obtained via dhcp:
Quote:
Ip Address 192.168.1.102
Broadcast Address 192.168.1.255
Subnet Mask 255.255.255.0
Default Route 192.168.1.1
Primay DNS 192.168.1.1
This is /etc/resolv.conf:
Quote:
nameserver 127.0.0.1
this is /var/run/dnsmasq/resolv.conf:
Quote:
nameserver 192.168.1.1
These are firewall forward rules:
Quote:
# iptables -nvL FORWARD
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- * ppp0 0.0.0.0/0 0.0.0.0/0 state NEW,RELATED,ESTABLISHED
0 0 ACCEPT all -- ppp0 * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 4
0 0 ACCEPT tcp -- all * 0.0.0.0/0 0.0.0.0/0 tcp dpt:4662
0 0 ACCEPT udp -- all * 0.0.0.0/0 0.0.0.0/0 udp dpt:4665
0 0 ACCEPT udp -- all * 0.0.0.0/0 0.0.0.0/0 udp dpt:4672
0 0 ACCEPT udp -- all * 0.0.0.0/0 0.0.0.0/0 udp dpt:4665
These are firewall nat rules:
Quote:
#iptables -nvL -t nat

Chain PREROUTING (policy ACCEPT 4182 packets, 393K bytes)
pkts bytes target prot opt in out source destination

Chain INPUT (policy ACCEPT 2097 packets, 251K bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 13621 packets, 926K bytes)
pkts bytes target prot opt in out source destination

Chain POSTROUTING (policy ACCEPT 13621 packets, 926K bytes)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- * ppp0 192.168.1.0/24 0.0.0.0/0
 
Old 02-16-2012, 05:05 AM   #2
shams
Member
 
Registered: Jan 2004
Posts: 535

Original Poster
Rep: Reputation: 30
This solve the problem:
Quote:
echo 1 > /proc/sys/net/ipv4/ip_forward
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
When trying to connect to wireless network machine freezes solid TuxLives Mandriva 5 01-22-2009 12:35 PM
Cant connect to network using Wireless AP in client mode SyZyGyFiRe Linux - Wireless Networking 2 08-09-2007 02:24 AM
Unable to connect SUSE 10 machine to windows network Harry Hamlin Linux - Networking 2 12-17-2005 12:33 AM
VPN client to connect to my school's network lowpro2k3 Linux - Networking 2 09-01-2005 09:10 PM
linux machine does not connect to the network in windows network Bzuco Linux - Networking 2 07-19-2004 04:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration