Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2001 20:19:14 +0100
From:      "Alex" <d_f0rce@gmx.de>
To:        "G Hasse" <gh@raditex.se>
Cc:        <freebsd-isdn@freebsd.org>, <freebsd-questions@freebsd.org>
Subject:   AW: ISDN dialin - Problems with userland ppp - SOLVED
Message-ID:  <NEBBIKIHMLCDHCFEOMAHIEBDCBAA.d_f0rce@gmx.de>
In-Reply-To: <Pine.BSF.4.21.0103181657230.11691-100000@gandalf.sickla.raditex.se>

next in thread | previous in thread | raw e-mail | index | archive | help
> -----Ursprüngliche Nachricht-----
> Von: G Hasse [mailto:gh@raditex.se]
> Gesendet: Sonntag, 18. März 2001 17:02
> An: Alex
> Cc: freebsd-isdn@FreeBSD.ORG; freebsd-questions@FreeBSD.ORG
> Betreff: Re: ISDN dialin - Problems with userland ppp
>
>
> On Sun, 18 Mar 2001, Alex wrote:
> >
> > I'm trying to enable isdn dialin and DSL dialout with
> > i4b and userland ppp. DSL dialout works properly, but
> > I couldn't manage to get ISDN dialin to work. It seems
> > that the interface between isdnd and userland ppp doesn't work
> > because I can see that isdnd is invoking my "regprog" but
> > ppp doesn't take over the connection.
>
> I have the same experience. Dialing out is fine. Dialing in dosen't
> work. If you find any solution - please let me know.

Hi,

Yeah, it works!! It seems that there is a problem with /dev/i4brbch0 when
using i4bppprun provided with i4b because ppp always looses the connection
to the device.

Mar 18 18:09:25 lisa ppp[2420]: IPCP: deflink: State change Closed -->
Req-Sent
Mar 18 18:09:25 lisa ppp[2420]: Error: DoLoop: select(): Bad file descriptor
Mar 18 18:09:25 lisa ppp[2420]: IPCP: deflink: SendTerminateReq(1) state =
Req-Sent
Mar 18 18:09:25 lisa ppp[2420]: IPCP: deflink: State change Req-Sent -->
Closing
Mar 18 18:09:25 lisa ppp[2420]: Error: Oops, destroying a datalink in state
open
Mar 18 18:09:25 lisa ppp[2420]: Error: ID0logout: No longer logged in on
i4brbch

I remade the device and tried a lot of other things but nothing
helped. Therefore I decided to switch to a bash-script executing:

	"/usr/sbin/ppp -direct inc_rbch0 <>/dev/i4brbch0"

I first tried using /bin/sh but it seems that sh is not redirecting
STDIN and STDOUT at the same time. I could always see the PAP-requests
of my site but the remote end didn't answer (Well, probably the remote
end answered but the answer wasn't redirected to STDIN of ppp).

If you want to try my configuration, you should compile bash2 from
the ports and use the following bash-script:

/etc/isdn/i4brunppp
--------------------------------------------------------------------
#! /usr/local/bin/bash
/usr/sbin/ppp -direct inc_rbch0 <>/dev/i4brbch0
--------------------------------------------------------------------

Put it into /etc/isdn/ and name it i4brunppp. Don't forget to set
execute-rights.

Then you have to edit /etc/isdn/isdnd.rc to suite your needs. Here
is my configuration file:

/etc/isdn/isdnd.rc
--------------------------------------------------------------------
system
# Accounting
acctall         = on
acctfile        = /var/log/isdnd.acct
useacctfile     = yes
isdntime        = on

# Monitor-Access - disabled
monitor-allowed = no
monitor-port    = 451
monitor         = "/var/run/isdn-monitor"
monitor-access  = fullcmd
monitor-access  = channelstate, logevents
monitor-access  = callin, callout
monitor         = "10.10.10.0/24"
monitor-access  = restrictedcmd, channelstate, callin, callout

regexpr           = "DIALIN.*call active"
regprog           = i4brunppp

# MAIL settings in case of errors
mailer    = "/usr/bin/mail"
mailto    = "root"

rtprio          = 25

entry
name            = DIALIN
isdncontroller  = 0
isdnchannel     = -1
usrdevicename   = rbch
usrdeviceunit   = 0
local-phone-dialout   = <yourdialout#>
local-phone-incoming  = <yourdialin#>
remote-phone-dialout  = 0
remote-phone-incoming = *
b1protocol      = hdlc
dialin-reaction = accept
dialout-type    = normal
direction       = in
idletime-incoming = 300
ratetype          = 0
unitlength        = 0
unitlengthsrc     = conf
--------------------------------------------------------------

Don't forget to replace <yourdialout#> and <yourdialin#> with
your local settings.

Now you have to edit your ppp.conf in /etc/ppp/ppp.conf
Here is mine:

/etc/ppp/ppp.conf
--------------------------------------------------------------
inc_rbch0:
 set log CCP Command IPCP LCP
 enable pap
 set ifaddr 10.10.40.1 10.10.40.11
 set timeout 60
 set dial
 set login
 set hangup
 set device /dev/i4brbch0
 set speed sync
 accept dns
 set dns 10.10.10.1

# disable pred1
# disable passwdauth
# disable deflate
# disable protocomp
# disable vjcomp
#
# deny acfcomp
# deny deflate
# deny pred1
# deny protocomp
# deny vjcomp
--------------------------------------------------------------

This is just the dialin part of my ppp.conf file. You have to
replace "set ifaddr" and "set dns" with your local settings.

If you change the name of your dialin-config from "inc_rbch0"
to something else, you have to change the bash-script too !!!!

Uncomment the "disable" and "deny" settings if your clients
have problems connecting. I had a Win95 client which didn't
like VanJacobsen Compression (vjcomp). You have to poke arround
with the settings a bit. Windows 98 and NT 2000 clients don't
have these problems.

If you want dialout too, then you have to create another entry
with your dialout settings. You shouldn't label this entry
"default". Use another name (i.e. dialout).

If you want dialout on demand you can use the following rc.conf
settings:

/etc/rc.conf
-------------------------------------------------------------
ppp_enable="YES"
ppp_mode="auto"
ppp_nat="YES"
ppp_profile="<yourdialoutlabel>"
ppp_user="root"
-------------------------------------------------------------

Replace <yourdialoutlabel> with your dialout label from
/etc/ppp/ppp.conf. If you don't want NAT then replace

	ppp_nat="YES"
with
	ppp_nat="NO"

Test your dialout-config NOW! If your dialout config doesn't
work go to http://www.freebsd.org/ and have a look at the
documentation. There is lots of documentation for dialout
configs.

Last but not least you have to edit /etc/ppp/ppp.secret and
put your dialin logins and passwords in there.

/etc/ppp/ppp.secret example
-------------------------------------------------------------
login1 password1
login2 password2
-------------------------------------------------------------

You can do a lot with this file (i.e. assign a specific IP to
a specific user). Read the docs if you need such features.

That's it. Assuming your local isdn configuration is done
correctly and you started isdnd, you should now be able to
dialin.

You can start isdnd i.e. using:
-------------------------------------------------------------
isdn_enable="YES"
isdn_fsdev="/dev/ttyv8"
isdn_flags="-dn -d0x1f9"
-------------------------------------------------------------
in /etc/rc.conf



Things you have to watch out for if your dialin still doesn't
work:

- Check your ISDN configuration. Try to DIALOUT to an ISP only
  using i4b. If this works, your isdn configuration seems to be
  correct.
- Increase logging of isdnd and ppp.
- Is the name of the dialin-label in /etc/isdn/i4brunppp the same
  as in /etc/ppp/ppp.conf?
- If you use dialout at the same time - do you have a second tun
  device configured in your kernel config.

Finally here is my kernel config file. Watch Out! You cannot just
append these settings to your config file. You have to change them
to suite your needs!!!!
---------------------------------------------------------------
# I want NAT, but no firewall => default_to_accept
options         IPFIREWALL
options         IPFIREWALL_DEFAULT_TO_ACCEPT
options         IPDIVERT

# You need these settings for dialin
pseudo-device   ppp     2
pseudo-device   tun     2

# You want compression? Include those settings.
options         PPP_BSDCOMP
options         PPP_DEFLATE

# You need bpf too, if you want to use it.
options         PPP_FILTER

# That's my ISDN card. Change this to yours.
options         "AVM_A1_PCI"
device          isic0

# ISDN settings. Change them to your needs. You
# probably need most of them.
pseudo-device   "i4bq921"
pseudo-device   "i4bq931"
pseudo-device   "i4b"
pseudo-device   "i4btrc"        4
pseudo-device   "i4bctl"
pseudo-device   "i4brbch"       4
pseudo-device   "i4bipr"        4
options         IPR_VJ
pseudo-device   "i4bisppp"      2
pseudo-device   sppp
-----------------------------------------------------------------

You don't need all of those settings. It depends on your local
needs.

Hope this helps.


Greetins,
Alex



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NEBBIKIHMLCDHCFEOMAHIEBDCBAA.d_f0rce>