Hello, after problems on my linksys modem-router (it is KO), I try to connect my private network with my old speed touch home ethernet.
Here problems starts.
I have a server slackware with 3 ethernet cards.
eth0 (192.168.2.2) : connected to hub and is server dhcp for 192.168.2.0/24
eth1 -> pppoe
eth2 (192.168.1.2) : connected to my computer and is also server dhcp for 192.168.1.0/24
My computer get an IPv4 address without problem, but it can't go on internet.
My iptables script is :
Code:
# iptables rules
/usr/sbin/iptables -A POSTROUTING -t nat -o ppp0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
but my PC don't join internet and no log appears in /var/log/syslog nor /var/log/messages on my server.
By searching here I found that link :
http://www.akadia.com/services/pppoe_iptables.html
My pppoe.conf file seems Ok :
...
DEFAULTROUTE=yes
...
CLAMPMSS=1412
...
But when I type :
Code:
# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
90.12.193.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.2.0 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 eth2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
The last route for ppp0 is not set as UG (for gateway) so I del this one and recreate :
Code:
# route del default
# route add default gw 90.12.193.1
# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
90.12.193.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.2.0 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 eth2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 90.12.193.1 0.0.0.0 UG 0 0 0 ppp0
But I still can't access to the net with my PC
slacware 13.0
Roaring Penguin PPPoE Version 3.10
iptables v1.4.3.2