Hi all.
Slackware 13.1, kernel 2.6.37. I'm setting up a gateway.
eth1 - WAN, eth0 - LAN; We are connecting to beeline through L2TP.
There are several problems.
1)Routes from
/etc/ppp/ip-up.d/beeline are not beeing applied, although this script and
/etc/ppp/ip-up are executable, and i have
ipparam beeline in my l2tp config.
Here they are:
Code:
# cat /etc/ppp/ip-up.d/beeline
#!/bin/sh
GW=10.42.200.1
route del $5 dev $1
route add -host $5 gw $GW
route add -net 85.21.0.0 netmask 255.255.0.0 gw $GW
route add -net 10.0.0.0 netmask 255.0.0.0 gw $GW
for i in $(grep "^nameserver" /etc/resolv.conf | awk '{print $2}') ; do
route add -host $i gw $GW
done
route del default
route add default dev ppp0
Code:
# cat /etc/ppp/ip-up
#!/bin/sh
if [-x /etc/ppp/ip-up.d/$6 ]; then
/etc/ppp/ip-up.d/$6 $1 $2 $3 $4 $5
fi
2)If i have DNS- and DHCP-servers, using dnsmasq - how to set their IPs in LAN? In rc.inet1.conf for eth0?
3)The easiest way to test my gateway is to MASQUERADE all traffic to ppp0 with all policies set to ACCEPT? Or something else need to be done? What exactly needs to be done in Slack?