versuche gerade verzweifelt den pptp client unter meinem debian zum laufen zu kriegen.
die PPTP Verbindung zum Server steht. verbindung mit windows clients auch möglich.
mein problem ist leider das routing.
habe mich an dem source fourge how to orientiert
( http://pptpclient.sourceforge.net/routi ... atic-setup )
und möchte am ende allen traffic durch denn tunnel leiten - All Traffic Through Tunnel. ich komme leider nur nicht mit den script beispielen klar.
Code: Alles auswählen
#!/bin/sh
# pppd ip-up script for all-to-tunnel routing
# name of primary network interface (before tunnel)
PRIMARY=eth0
# address of tunnel server
SERVER=tunnel.example.com
# provided by pppd: string to identify connection aka ipparam option
CONNECTION=$6
if [ "${CONNECTION}" = "" ]; then CONNECTION=${PPP_IPPARAM}; fi
# provided by pppd: interface name
TUNNEL=$1
if [ "${TUNNEL}" = "" ]; then TUNNEL=${PPP_IFACE}; fi
# if we are being called as part of the tunnel startup
if [ "${CONNECTION}" = "tunnel" ] ; then
# direct tunnelled packets to the tunnel server
route add -host ${SERVER} dev ${PRIMARY}
# direct all other packets into the tunnel
route del default ${PRIMARY}
route add default dev ${TUNNEL}
fi
Code: Alles auswählen
#!/bin/sh
# pppd ip-down script for all-to-tunnel routing
# name of primary network interface (before tunnel)
PRIMARY=eth0
# provided by pppd: string to identify connection aka ipparam option
CONNECTION=$6
if [ "${CONNECTION}" = "" ]; then CONNECTION=${PPP_IPPARAM}; fi
# provided by pppd: interface name
TUNNEL=$1
if [ "${TUNNEL}" = "" ]; then TUNNEL=${PPP_IFACE}; fi
# if we are being called as part of the tunnel shutdown
if [ "${CONNECTION}" = "tunnel" ] ; then
# direct packets back to the original interface
route del default ${TUNNEL}
route add default dev ${PRIMARY}
fi
und hier benötige ich deine hilfe:
Jetzt würde das abgeändert bei mir ja wiefolgt aussehen?!
Code: Alles auswählen
#!/bin/sh
# pppd ip-up script for all-to-tunnel routing
# name of primary network interface (before tunnel)
PRIMARY=eth0
# address of tunnel server
SERVER=pptp.server.net
# provided by pppd: string to identify connection aka ipparam option
CONNECTION=$6
if [ "${CONNECTION}" = "" ]; then CONNECTION=${PPP_IPPARAM}; fi
# provided by pppd: interface name
TUNNEL=$1
if [ "${TUNNEL}" = "" ]; then TUNNEL=${PPP_IFACE}; fi
# if we are being called as part of the tunnel startup
if [ "${CONNECTION}" = "pc1service" ] ; then
# direct tunnelled packets to the tunnel server
route add -host ${SERVER} dev ${PRIMARY}
# direct all other packets into the tunnel
route del default ${PRIMARY}
route add default dev ${TUNNEL}
fi
Code: Alles auswählen
#!/bin/sh
# pppd ip-down script for all-to-tunnel routing
# name of primary network interface (before tunnel)
PRIMARY=eth0
# provided by pppd: string to identify connection aka ipparam option
CONNECTION=$6
if [ "${CONNECTION}" = "" ]; then CONNECTION=${PPP_IPPARAM}; fi
# provided by pppd: interface name
TUNNEL=$1
if [ "${TUNNEL}" = "" ]; then TUNNEL=${PPP_IFACE}; fi
# if we are being called as part of the tunnel shutdown
if [ "${CONNECTION}" = "pc1service" ] ; then
# direct packets back to the original interface
route del default ${TUNNEL}
route add default dev ${PRIMARY}
fi
und hier am rande noch ein paar nebensächliche informationen:
Code: Alles auswählen
root@iBook:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto pc1service
iface pc1service inet ppp
provider pc1service
root@iBook:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:95:EF:AC:88
inet addr:10.1.10.92 Bcast:10.1.255.255 Mask:255.255.0.0
inet6 addr: fe80::20a:95ff:feef:ac88/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1022 errors:0 dropped:0 overruns:0 frame:0
TX packets:992 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:592184 (578.3 KiB) TX bytes:184745 (180.4 KiB)
Interrupt:41 Base address:0x4000
lo bla blub
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.1.144 P-t-P:192.168.1.8 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1496 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:78 (78.0 b) TX bytes:72 (72.0 b)
root@iBook:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.8 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
10.1.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.1.10.1 0.0.0.0 UG 0 0 0 eth0
^^ so siehts aus wenn ich verbunden bin ^^
root@iBook:~# ifdown pc1service
root@iBook:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.1.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.1.10.1 0.0.0.0 UG 0 0 0 eth0
^^ und so siehts aus wenn ich nicht mehr verbunden bin
root@iBook:~#
Code: Alles auswählen
root@iBook:~# ./all-trought-tunnel.sh
root@iBook:~#
wäre vielleicht jemand so nett und könnte mir das script verbessern oder mir nen tipp geben?
dankeschön ;-)
grüße Leo