• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1440
  • Last Modified:

Netstat -rn

Can anyone help me translate this... I've got a connectivity problem
after switching to ADSL using ppoe.

I'd like to know if what each line looks ok, or if there is potential problem.
Specifically traffic from internal eth1 is being forwarded out my eth0 external ip?

root@som:~> netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
61.111.23.43   0.0.0.0         255.255.255.255 UH        0 0          0 ppp1
63.23.32.65     0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
127.0.0.0         0.0.0.0         255.0.0.0       U         0 0          0 lo
0.0.0.0            61.111.23.43    0.0.0.0         UG        0 0          0 ppp1

thanks.

John
0
jjbarnsley
Asked:
jjbarnsley
2 Solutions
 
dananditaCommented:
Could you please more specific about your connectivity problem?
Your routing table looks fine for standard ppp client.
0
 
ahoffmannCommented:
Cc: what is the problem?
0
 
wesly_chenCommented:
> 0.0.0.0            61.111.23.43    0.0.0.0         UG        0 0          0 ppp1
It means your default gateway is passing through ppp1 interface.

But you have another WAN IP on eth0 (63.23.32.65).
$ nslookup 63.23.32.65
Server:  ns2.mindspring.com
Address:  207.69.188.186

Name:    1Cust65.an3.cle11.da.uu.net
Address:  63.23.32.65

I would say you either use eth1 as your default gateway interface (not use ppoe) or
disable eth1.

2 WAN interfaces without properly configuration will loop and packet lost.
That's your main problem.
0
 
Gabriel OrozcoSolution ArchitectCommented:
I would say this:

eth1 is Local Area Network
eth0 has a public ip address, but it's not used since eth0 is used for pppoe.

what I think is you want to share internet using this computer, and do not know why it is not working, or if it is secure.

you need to have a firewall, which is the point where you share the internet also.

this is a firewall that should work for you:
------------------------------------------------
#Activate IP Forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

ipt=`which iptables`
outside=ppp1
inside=eth1

$ipt -F
$ipt -t nat -F
$ipt -t mangle -F
$ipt -P INPUT DROP
$ipt -P FORWARD DROP
$ipt -P OUTPUT ACCEPT

$ipt -A INPUT -i lo -j ACCEPT
$ipt -A FORWARD -i $inside -j ACCEPT

# This is for stateful firewall:
$ipt -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$ipt -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

# The INPUT section is where you allow access to services hosted on your
# linux server, like tcp:80 (HTTP) or TCP:21 (FTP):
#Accept at least traffic to ssh into this host.
$ipt -A INPUT -p tcp --dport 22 -j ACCEPT

# Here is the NAT part, where you share internet access.
$ipt -t nat -A POSTROUTING -o $outside -j MASQUERADE
------------------------------------------------

I would say you need to be careful and make the firewall to have the output interfase in ppp0, since ppp1 is only used when ppp0 is already taken or when you disconnect and connect too fast. therefore, you should be using normally ppp0.
put it on the outside variable with outside=ppp0, and the firewall will protect your computer and your internal network, while sharing internet access.

please do not forget to add the DNS to your client computers. if you want linux to be a dns cache, just start your dns service (service named start) and you should be able to use the internal ip of your linux box as a default gateway and dns for internet access.

hope I understood the problem
Gabriel
0
 
jjbarnsleyAuthor Commented:
thanks for your comments.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now