PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : remote login 2 kanal ?!?!


jkaiser
06.07.01, 15:52
Hab ich zwar noch nicht gemacht, sollte aber genauso funktionieren!


Gruß, Jens

pierre
06.07.01, 23:18
Hallöchen....

info`:

Einwahlserver suse 7.1 per ISDN / Analog->noch nicht fertig

aber es geht um ISDN....es sollte doch möglich sein wenn jetzt ein User sich anmeldet und den 1 Kanal benutzt das ein zweiter user den 2 Kanal benutzen kann oder?!?!?

muß ich vielleicht ne neue device einrichten für den 2 Kanal ippp1 ????

dank im vorraus!!

greetz Pierre

jkaiser
07.07.01, 20:07
In der Juni Ausgabe der Linux Enterprise wird genau diese Lösung beschrieben um sich von seinem Handy aus auf seinen Linux-Server einzuwählen um dann per ISDN weiter in Internet zu kommen. Das ganze bietet dann WAP für ca. 18 Pf/Min (15 Pf. der Anruf der Best Friend Nummer + 3 PF Internet)!

Gruß, Jens

Jaydee
09.07.01, 06:59
Moin,

ist eigentlich ganz einfach, Du musst Deine ip-up modifizieren, und dive. Einstellungen

bzgl. ISDN machen. Wenn Du willst, poste ich Dir die ip-up

Gruß Alex

pierre
09.07.01, 10:17
ja..das wäre echt korrekt!!

bin gerade dabei..im ISDN 4 Linux Faq nachzublättern..jedoch noch nicht fündig geworden..wenn du sie posten würdest :-))

greetz Pierre

Jaydee
09.07.01, 10:30
Hier ist sie ...



#!/bin/sh

# (c) '97, S.u.S.E. GmbH, Fuerth, Germany
# Klaus Franken <kfr@suse.de>
# 25.02.98
#
# Remo Behn <sray@suse.de>
# 18.07.98

BASENAME=`basename $0`
INTERFACE=$1
DEVICE=$2
SPEED=$3
LOCALIP=$4
REMOTEIP=$5

if [ -z "$REMOTEIP" ]; then
echo "Usage: $0 <INTERFACE> <DEVICE> <SPEED> <LOCALIP> <REMOTEIP>"
exit 1
fi

# 1tes Interface für die Einwahl.

case "$INTERFACE" in
ippp0)

. /etc/rc.config

# find the device
found=0
for I in $NETCONFIG; do
eval NETDEV=\$NETDEV$I
if [ $NETDEV = $INTERFACE ]; then
found=1
break;
fi
done
if [ $found -eq 0 ]; then
echo "Device '$INTERFACE' not configured in '/etc/rc.config'"
exit 1
fi

eval IFCONFIG=\$IFCONFIG$I
DEST=`grep -v "^#" /etc/route.conf | grep "$INTERFACE\$" | awk '{ print $1}'`
DEFAULT=`grep -v "^#" /etc/route.conf | grep default | awk '{ print $2}'`

#echo "ok, NETDEV:$NETDEV; IFCONFIG:$IFCONFIG."
#echo " DEST: $DEST; DEFAULT: $DEFAULT"

case "$BASENAME" in
ip-up)
# default deny
#ipfwadm-wrapper -I -p deny
#ipfwadm-wrapper -O -p deny

# flush
#ipfwadm-wrapper -I -f
#ipfwadm-wrapper -O -f

# accept dns
#ipfwadm-wrapper -O -a accept -P udp -S 0/0 53 1024:65535 -D 0/0 53 -W $INTERFACE
#ipfwadm-wrapper -I -a accept -P udp -D 0/0 53 1024:65535 -S 0/0 53 -W $INTERFACE
#ipfwadm-wrapper -O -a accept -P tcp -S 0/0 53 1024:65535 -D 0/0 53 -W $INTERFACE
#ipfwadm-wrapper -I -a accept -P tcp -D 0/0 53 1024:65535 -S 00/0 53 -k -W $INTERFACE

# accept connect from client to internet
#ipfwadm-wrapper -O -a accept -P tcp -S 0/0 1024:65535 -D 0/0 -W $INTERFACE
#ipfwadm-wrapper -I -a accept -P tcp -D 0/0 1024:65535 -S 0/0 -k -W $INTERFACE

# deny, last match
#ipfwadm-wrapper -I -a deny -P tcp -S 0/0 -D 0/0 -W $INTERFACE
#ipfwadm-wrapper -I -a deny -P udp -S 0/0 -D 0/0 -W $INTERFACE

# default accept
#ipfwadm-wrapper -I -p accept
#ipfwadm-wrapper -O -p accept

/sbin/route add default gw $REMOTEIP dev $INTERFACE

# maybe you want to start mail services:
# set follow variables in /etc/rc.config
# SENDMAIL_TYPE="yes"
# SENDMAIL_SMARTHOST="<ISP-mailserver>"
# SENDMAIL_ARGS="-bd -om"
# SENDMAIL_EXPENSIVE="yes"
# SENDMAIL_NOCANONIFY="yes"
# /usr/bin/fetchmail -a -v >>/var/log/fetchmail 2>&1 &
# /usr/sbin/sendmail -q &
;;
ip-down)
# restart interface
/sbin/ifconfig $INTERFACE down
# workaround due to kernel problem with 'kernd':
sleep 1
/sbin/ifconfig $INTERFACE $IFCONFIG

# flush, del all rules
#ipfwadm-wrapper -I -f
#ipfwadm-wrapper -O -f

# set routes from /etc/route.conf
test -z "$DEST" &#0124;&#0124; /sbin/route add -host $DEST dev $INTERFACE
test -z "$DEFAULT" &#0124;&#0124; /sbin/route add default gw $DEFAULT
;;
*)
;;
esac
;;

#2tes Device für Einahl.

case "$INTERFACE" in
ippp1)

. /etc/rc.config

# find the device
found=0
for I in $NETCONFIG; do
eval NETDEV=\$NETDEV$I
if [ $NETDEV = $INTERFACE ]; then
found=1
break;
fi
done
if [ $found -eq 0 ]; then
echo "Device '$INTERFACE' not configured in '/etc/rc.config'"
exit 1
fi

eval IFCONFIG=\$IFCONFIG$I
DEST=`grep -v "^#" /etc/route.conf | grep "$INTERFACE\$" | awk '{ print $1}'`
DEFAULT=`grep -v "^#" /etc/route.conf | grep default | awk '{ print $2}'`

#echo "ok, NETDEV:$NETDEV; IFCONFIG:$IFCONFIG."
#echo " DEST: $DEST; DEFAULT: $DEFAULT"

case "$BASENAME" in
ip-up)


ip-down)


*)
esac


ppp*)
# Analog-PPP, add commands as you need...
case "$BASENAME" in
ip-up)
#
# This code allows automatic configuration of your resolv.conf
# for peer supplied DNS addresses when using the `usepeerdns'
# option. Original resolv.conf is restored when ip-down is called
# by pppd when the link goes down.
#
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
rm -f /etc/ppp/resolv.prev
if [ -f /etc/resolv.conf ]; then
cp -p /etc/resolv.conf /etc/ppp/resolv.prev
grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
cat /etc/ppp/resolv.conf /etc >> /etc/resolv.conf
echo "Modified /etc/resolv.conf for DNS at $INTERFACE"
else
cp /etc/ppp/resolv.conf /etc
chmod 644 /etc/resolv.conf
echo "Installed /etc/resolv.conf for DNS at $INTERFACE"
fi
if [ "$START_NSCD" = yes ]; then
/sbin/init.d/nscd restart &
fi
fi
test -x /etc/ppp/ip-up.local && /etc/ppp/ip-up.local $*
;;
ip-down)
#
# This code restores the original resolv.conf saved when ip-up
# was called by the pppd which uses the `usepeerdns' option and
# resolv.conf was modified for the supplied dns server adresses.
#
if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
if [ -f /etc/ppp/resolv.prev ]; then
cp -fp /etc/ppp/resolv.prev /etc/resolv.conf
echo "Restored original /etc/resolv.conf"
else
rm -f /etc/resolv.conf
echo "Deinstalled /etc/resolv.conf"
fi
if [ "$START_NSCD" = yes ]; then
/sbin/init.d/nscd restart &
fi
fi
test -x /etc/ppp/ip-down.local && /etc/ppp/ip-down.local $*
;;
*)
;;
esac | logger -t $BASENAME
;;
*)
# dont know...
;;
esac

pierre
09.07.01, 10:35
supi :) :)...und was ist mit isdn einstellungen, muß ich da noch was ändern???...kann ich jetzt auch mit 2 Kanälen mich einwählen???

greetz Pierre

pierre
09.07.01, 12:42
irgendwie klappt das noch net...x()
muß die options.ippp1 und options.ippp0 gleich sein????
eigentlich nich oder,, weil wenn sie gleich sind dann kann doch nur ein client zur zeit sich einwählen..nicht 2 ?!?! wegen der gleichen ip-adresse!!!!

..ich versuchs einfach ma... :p

Jaydee
09.07.01, 14:13
Du musst der ippp0 un der ippp1 ne eindeutige IP vergeben, sowie dem jew. remote partner.

Willst Du mal so ne options.ippp1 haben... ich denke mal ...

also



# /etc/ppp/options.ippp?
#
# for isdn4linux/syncPPP and dynamic IP-numbers
#
#
# Klaus Franken, kfr@suse.de
# Version: 27.08.97 (5.1)
#
# This file is copy by YaST from /etc/ppp/ioptions.YaST
# to options.<device>

# The device(s)
# for more than one device try:
# /dev/ippp0 /dev/ippp1 ...
/dev/ippp0 #also das erste isdn device

proxyarp # um im Netz sichtbar zu werden ...

# The IP addresses: <local>:<remote>
# just "0.0.0.0:" or nothing for dynamic IP

#1. ist in ifconfig der P-t-P
10.10.10.40:10.10.10.35


# The netmask
# it should be 255.255.255.255
#
#netmask 255.255.255.255

# my user name
#user "suse"

# my system name (only for CHAP!)
# name my_system_name
#name "suse"

# accept IP addresses from peer
# use with dynamic IP
#ipcp-accept-local
#ipcp-accept-remote
#noipdefault

# default route should be set by ipppd
# defaultroute

# try to get IP address from interface
# option specific to ipppd (as opposed to pppd)
# use only with static IP
#useifip

# disable all header-compression
-vj
-vjccomp
-ac
-pc
-bsdcomp

# max receive unit
mru 1524
# max transmit unit
mtu 1500

# If this machine is a server, force authentication by uncommenting one
# of the following. However, if this machine is a client, doing this will
# prevent a succesful connection! (message "peer refused to authenticate").
# So, only uncomment on a server.
# "+pap" / "+chap" NUR AKTIVIEREN, WENN DIES EIN SERVER IST!!!
+pap
#+chap

# if you have problems with handshaking (no response for first
# lcp-package) try t decrease the retry-cycle. Default is 3 sec,
# try for example 2 sec:
# lcp-restart 2
# sometimes you need this:
#noccp

# Get dns info from peer, also den lokalen dns server übergeben
ms-dns 10.10.10.10

pierre
09.07.01, 14:37
hab ich bereits gemacht... z.B.
local : 192.168.0.1
remote : 192.168.0.41

so steht es in der ippp0

wie soll es in der ippp1 stehen ?!?!?

genauso wie in der ippp0 oder ne andere remote ip???

Jaydee
09.07.01, 15:07
Hast Du auch mit yast die devices angelegt ?

Wenn du willst dass sich 2 leute gleichzeitig einwählen könne, dann musst du auch 2 verschiedene remote partner ip´s vergeben.

post mal deine ifconfig - ausgabe, dann sag ich dir was in options.ippp0 bzw .ippp1 stehen muss.

pierre
09.07.01, 15:18
ippp0:

Link encap:Point-to-Point Protocol
inet addr:192.168.0.1 P-t-P:192.168.0.41 Mask:255.255.255.255 Up POINTTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:683 errors:0 dropped:0 overruns:0 frame:0 TX packets:516 error:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:30

lo:

Link encap:Local Loopback
inet addr. 127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3792 Metric:1
RX packets:0 errors:0 drooped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0

die ippp1 zeigt er nicht an..mit ifconfig ?!?!?

Jaydee
09.07.01, 23:19
Sicher,

Du musst halt ein 2tes device für ISDN erstellen und eine options.ippp1 anlegen.

in /etc/rc.config/i4l.rc.config dann dem ippp1 sagen welche MSN es hat ...

Gruß Alex

pierre
09.07.01, 23:37
yo hab ich schon gemacht...muß jetzt nur noch die ip-up editieren!!!

danke nochma :-))))

jkaiser
10.07.01, 08:58
Hi Pierre!

Ist doch gar nicht so schwer!
Wenn das zweite Interface konfiguriert und hochgefahren ist, sollte die Einwahl wohl kein Problem sein! Die lokale IP-Adresse, welche du für ippp1 vergibst, darf dieselbe sein wie bei ippp0 und eth0 sein! Durch die Host-Routen zu den Point-to-Points weiß Linux über welche Interfaces er die Datenpakt wohin senden muß! Die IP-Adresse für die jeweiligen Clients müssen natürlich unterschiedlich sein, is ja klar ne!
Aber du hast den Fehler ja selbst gefunden: ippp1 ist gar nich da! Hast du es überhaupt eingerichtet (ich bevorzuge da YaST1)? Vorher geht es natürlich nicht!

Noch was für Jaydee:
Warum macht du für das zweite ippp Interace ein neues case auf und integriert es nicht im ersten? Steht bei SuSE nicht case $INTERFACE in ippp*) und ist der Zweig damit nicht für alle ippp-Devices zuständig?

Gruß, Jens

pierre
10.07.01, 10:11
Das interface is bereits angelegt.. aber funzt leider net...

außerdem versteht ihr glau ich nicht was ich meine oder ichd rück mich falsch aus..

WAS IST WENN SICH 1 CLIENT PER KANALBÜNDELUNG EINWÄHLT?????? benutzt er dann beide interfaces ippp0 & ippp1 das funzt ja denn nicht wenn dort unterschiedliche remote ip`s drinne stehen!!! oder??? habs auch schon so ausprobiert mit unterschiedlichen ip-adressen jedoch ohne erfolg in der log datei " messages " steht das er den anruf immer ignored...

gruß Pierre

pierre
10.07.01, 12:54
hier noch ne hinweis...
in der log datei " messages " kommt folgende meldung nachdem 1 kanal verbindung besteht :

ipppd[216] ppp not replacing existing default route to ippp0[192.168.0.41]

pierre
10.07.01, 15:18
ha...die einwahl funzt...die msn in der i4l.rc.config war falsch gesetzt!! x() x()
puhh...schwere geburt..DANK nochma an alle die mitgeholfen haben :) :) :)

gruß Pierre