[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help:Problems with routing



And, for masquerading/simple firewall:

iptables -A INPUT   -i ppp0 -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i ppp0 -m state --state NEW,INVALID -j DROP

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

assuming that your kernel was compiled with iptable support.
san


On Sat, 2001-11-24 at 22:33, San Segkhoonthod wrote:
> > Eth0 192.168.10.5 (desktop as an alias)
> > 
> > # route
> > Destination     Gateway         Genmask         Flags Metric Ref   
> Use Iface
> > 212.210.33.130  *               255.255.255.255 UH    0      0       
> 0 ppp0
> > 192.168.10.0    *               255.255.255.0   U     0      0       
> 0 eth0
> > default         desktop         0.0.0.0         UG    0      0       
> 0 eth
> 
> Your desktop's default route should be ppp0, not eth0, like this:
> 
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> 212.210.33.130  *               255.255.255.255 UH    0      0        0
> ppp0
> 192.168.10.0    *               255.255.255.0   U     0      0        0
> eth0
> default         212.210.33.130  0.0.0.0         UG    0      0        0
> ppp0
> 
> from your current routing table, try to:
> # route del default
> # route add default gw 212.210.33.130 dev ppp0
> 
> san
> 
> On Sat, 2001-11-24 at 22:49, Vittorio wrote:
> > Please help!  
> > I can connect my portable PC to my desktop via ethernet
> > cards (eth0) and use ping, NFS, samba etc.
> > 
> > Now, after re-reading Net-HOWTO and following the examples in it, I've
> > been trying to set my desktop and its eth0 and ppp0 connections as a
> > router for my portable in order to use email and the internet on it by
> > means of ethernet connection. In a nutshell, the first 'extremely
> > simple' routing configuration in the HOWTO!  
> > 
> > Even though I've followed the easy instructions using the command
> > 'route add..' etc, it simply doesn't work in my case.
> > 
> > Here it is  the basic configuration info
> > 
> > On both system woody with 2.4.13 kernel
> > 
> > On my desktop (the would-be router)
> > 
> > Eth0 192.168.10.5 (desktop as an alias)
> > 
> > # route
> > Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> > 212.210.33.130  *               255.255.255.255 UH    0      0        0 ppp0
> > 192.168.10.0    *               255.255.255.0   U     0      0        0 eth0
> > default         desktop         0.0.0.0         UG    0      0        0 eth0
> > 
> > On my portable PC (the only client)
> > 
> > # route  
> > Kernel IP routing table
> > Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> > default         desktop         255.255.255.0   UG    0      0        0 eth0
> > 192.168.10.0    *               255.255.255.0   U     0      0        0 eth0
> > 
> > 
> > I can of course ping the eth0 on both sides using also their aliases
> > but......
> > the result when I try to ping a working internet address from my client is as
> > follows:
> > 
> > #ping 195.110.96.65    #
> > 
> > PING 195.110.96.65 (195.110.96.65): 56 data bytes
> > ping: sendto: Network is unreachable
> > ping: wrote 195.110.96.65 64 chars, ret=-1
> > 
> > 
> > What's wrong with it?
> > 
> > Vittorio
> > 
> > 
> > 
> > -- 
> > To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> > 
> > 
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 
> 




Reply to: