Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to setup dialin to server and them callback orginal dialin caller

0 views
Skip to first unread message

Joe & Fhe Barbish

unread,
Jan 9, 2002, 11:18:22 PM1/9/02
to
Brian
I did like you said and ran a test. I dialed in ok like
always but the callback did not happen. To get right to
the point of making it function, you need to see what I
have configured. To that ends I have included my ppp.conf
and ppp.secret files with a ppp.log from my last test.
Please give it a once over and see if you can identify
what's wrong? Cuua2 is the dial in and callback device.
My ppp.conf is heavyly commented for the jr people who work
for me supporting this work enviroment.

Thanks Joe


# ppp.secret file

# Authname Authkey Peer's IP address Label Callback

bob bob * * 12147295555


############################################################################
##
# /etc/ppp/ppp.conf File for dial out modem to ISP and Dial in modem for
# connection to this FBSD system.
# Written by Joe Barbish 12/10/2001
#
# This is a working ppp.conf file I use to dial in to my ISP and to connect
# my Win98 box by dialing in to this FBSD box and accessing the internet.
# There are options in this ppp.conf file that I do not use, But present
them
# here for you to turn on by un-commenting the statements to meet your
needs.
#
# For Nic to DSL configuration see www.daemonnews/200101/pppoe.html
#
# This ppp.conf documentation is based on a fresh install of FBSD 4.4 with
# all file content as delivered with no user changes.
#
# Setup Instructions.
# Note steps 4 through 7 are only for dial in setup.
# 1. Recompile kernel and change pseudo-device tun 1 to tun 4
# GENERIC kernel defaults to 1 and you need 1 tun device for each com
port
# 2. Add gateway_enable="YES" to /etc/rc.conf so dialin connection can gain
# access to internet.
# 3. Since a private internal IP address numbering scheme is used for IP
# addresses behind this FBSD box the -nat option must be included on the
# ppp command that starts the ppp task to dial the ISP.
# NAT = Network Address Translation. Changes your private internal IP
# address to your public IP address that you get from your ISP for
# outbound messages and does the reverse for inbound messages.
# From the command line example ppp -background -nat dialisp
# 4. Using root create file /etc/ppp/ppplogin
# Create file ppplogin with following 2 statements
# #! /bin/sh
# exec /usr/sbin/ppp -direct incoming
#
# incoming is the section label name in ppp.conf to be processed when
# ppp is started by this script's exec command.
#
# This script will be launched by getty when it detects a ppp dialin
# connection attempt. Program ppp belongs to group network, so you have
to
# change file ppplogin group to network and it's permissions to
read/write
# for the owner, read/execute for group, and none for everyone else.
# chgrp network ppplogin assign file ppplogin to group network
# chmod 650 ppplogin set permissions
# 5. Change the default section of /etc/gettytab file for automatic ppp
# recognition by specifying the pp capability. Add following
# :pp=/etc/ppp/ppplogin:
# 6. Edit /etc/ttys to enable a getty on the port where the dialin modem
# is attached. com2 = ttyd1 find statement like this
# ttyd1 "/usr/libexec/getty std.38400" dialup off secure
# Change off to on to activate. Verify line speed is correct (std.38400)
# This value is defined in /etc/gettytab. After saving edited results
# issue kill -1 1 command to spawn getty. Use ps ax to show active tasks.
# 7. cp /usr/share/examples/ppp/ppp.secret.sample /etc/ppp/ppp.secret
# Edit /etc/ppp/ppp.secret file adding the ID and password for each user
# that is authorized to login to this FBSD box using dialin modems.
# 8. TESTING Issue command ppp -background -nat dialisp to test
configuration
# Use commands ps ax to see task list. ifconfig -a to see if tun is
running
# netstat -ir to see routing. /var/log/ppp.log to view ppp log events
# ps ax to get ppp -background task number & kill -1 number to terminate.
# 9. Once you are done with testing, make functions permanent.
# Dial ISP at FBSD bootup. Add following to /etc/rc.conf file
# ppp_enable="YES"
# ppp_mode="ddial"
# ppp_profile="dialisp"
# ppp_nat="YES"
#
############################################################################
#

default:
# The default section is processed ever time user ppp is started.
# Ever thing set here applies to all the following section.

set log Phase Chat LCP IPCP CCP tun command #use for testing
#set log Phase tun #use to avoid excessive log
sizes


# If 115200 connection speed does not work (it should work with any modem
newer
# that 1998) step down to 57600 or 38400 or 19200 for legacy modems.

set speed 115200 # connection speed
set timeout 0 # no idle time out, will not disconnect

disable pred1 deflate lqr # compression features & line quality
reporting
deny pred1 deflate lqr # compression features & line quality reporting

dialisp:
# This label is used in the ppp -background -nat dialisp startup
# command for auto logon to ISP provider.

# Ensure that "device" references the correct serial port
# for your modem. (cuaa0 = COM1, cuaa1 = COM2)
# Only needed for dial out device.

set device /dev/cuaa1

# This dial string is needed for ISP's which use standard Unix style
# login. Not needed if ISP uses chap or pap login.
#
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"

# edit the next three lines and replace the values with
# the values which have been assigned by your ISP.
# Needed for Unix, chap, and Pap style logins.

#set phone 1111111:2222222:3333333 # if first number busy try next number
set phone 123456789 # only use this phone number
set authname barbish
set authkey xxxxxxx
set redial 10 4 # if busy redial 4 times with 10 second pause

#enable chap # select chap login authentication
enable pap # select pap login authentication

# get dynamic IP address from ISP.
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0


# set static IP address your ISP assigned to you.
# s.s.s.s = your static IP address
# g.g.g.g = IP of machine you connect to at ISP or default to 10.0.0.0/0

# set ifaddr s.s.s.s g.g.g.g 255.255.255.255 0.0.0.0

add default HISADDR # Add a (sticky) default route (Mandatory)
enable dns # Gets the ISP's DNS IP address & places them
# in resolv.conf for reference by FBSD box.


incoming:
# Configuration for dial in modem access to this FBSD system.
# This label is used in ppp -direct incoming command
# which is buried in script /etc/ppp/ppplogin that starts
# the whole process of accepting the incoming call.
# Enable passwdauth forces use of /etc/passwd file
# instead of /etc/ppp/ppp.secret file for PAP only.
# CHAP must use ppp.secret because ppp must have access to
# unencrypted passwords. This is ok over dialin modem lines.
# A unique IP address is assigned to the ttyd activated in the
# /etc/ttys/ file from the internal Private IP pool range.

# Every user that will be using PPP login must have there login ID
# in the allow user command to authorize them to run ppp.

allow users barbish bob

# SECURITY WARNING - It is VITAL that either pap or chap are enabled. If
# one or the other is not, you are allowing anybody to establish an dialin
# ppp session with your FBSD box using any ID/password. There is no
# authentication being done on incoming ppp connections if pap or chap is
not
# enabled. SECURITY WARNING

# enable passwdauth #force pap to use passwd file
# enable chap
enable pap # uses ppp.secret file

accept dns # give dialin connection access to dns lookup

# To get access to other machines on the LAN
# enable proxy

# Assign static IP address to this dialin line
# 10.0.0.74 = static IP address for this dialin line
# 10.0.0.1 = IP address of this FBSD box

set ifaddr 10.0.0.1 10.0.0.74 255.255.255.255

# If I had 4 modems connected to com1-com4 for dialin access and activated
# ttyd0-ttyd3 in /etc/ttys file this ppp.conf section [incoming] will work
# as is. Set ifaddr command assigns dynamic IP address from a range of
# reserved IP address. 10.0.0.71 through 10.0.0.74 inclusive) is the
# IP address pool reserved for dialin users.

# set ifaddr 10.0.0.1 10.0.0.71-10.0.0.74 255.255.255.0


# If we're running a ppp server that wants to only call back microsoft
# clients on numbers configured in /etc/ppp/ppp.secret (the 5th field):
#
callback-server:
load server
set callback cbcp
set cbcp
set log +cbcp
set redial 3 1
set device /dev/cuaa2 /dev/cuaa1
set speed 115200
set dial "TIMEOUT 10 \"\" AT OK-AT-OK ATDT\\T CONNECT"

ppp.log of the test

Jan 9 22:55:52 gateway ppp[378]: Phase: Using interface: tun0
Jan 9 22:55:52 gateway ppp[378]: Phase: deflink: Created in closed state
Jan 9 22:55:52 gateway ppp[378]: tun0: Command: default: set speed 115200
Jan 9 22:55:52 gateway ppp[378]: tun0: Command: default: set timeout 0
Jan 9 22:55:52 gateway ppp[378]: tun0: Command: default: disable pred1
deflate lqr
Jan 9 22:55:52 gateway ppp[378]: tun0: Command: default: deny pred1 deflate
lqr
Jan 9 22:55:52 gateway ppp[378]: tun0: Command: incoming: enable pap
Jan 9 22:55:52 gateway ppp[378]: tun0: Command: incoming: accept dns
Jan 9 22:55:52 gateway ppp[378]: tun0: Command: incoming: set ifaddr
10.0.0.1 10.0.0.74 255.255.255.255
Jan 9 22:55:52 gateway ppp[378]: tun0: Phase: PPP Started (direct mode).
Jan 9 22:55:52 gateway ppp[378]: tun0: Phase: bundle: Establish
Jan 9 22:55:52 gateway ppp[378]: tun0: Phase: deflink: closed -> opening
Jan 9 22:55:52 gateway ppp[378]: tun0: Phase: deflink: Connected!
Jan 9 22:55:52 gateway ppp[378]: tun0: Phase: deflink: opening -> carrier
Jan 9 22:55:53 gateway ppp[378]: tun0: Phase: deflink: /dev/ttyd2: CD
detected
Jan 9 22:55:53 gateway ppp[378]: tun0: Phase: deflink: carrier -> lcp
Jan 9 22:55:53 gateway ppp[378]: tun0: LCP: FSM: Using "deflink" as a
transport
Jan 9 22:55:53 gateway ppp[378]: tun0: LCP: deflink: State change
Initial --> Closed
Jan 9 22:55:53 gateway ppp[378]: tun0: LCP: deflink: State change
Closed --> Stopped
Jan 9 22:55:54 gateway ppp[378]: tun0: LCP: deflink: LayerStart
Jan 9 22:55:54 gateway ppp[378]: tun0: LCP: deflink: SendConfigReq(1) state
= Stopped
Jan 9 22:55:54 gateway ppp[378]: tun0: LCP: ACFCOMP[2]
Jan 9 22:55:54 gateway ppp[378]: tun0: LCP: PROTOCOMP[2]
Jan 9 22:55:54 gateway ppp[378]: tun0: LCP: ACCMAP[6] 0x00000000
Jan 9 22:55:54 gateway ppp[378]: tun0: LCP: MRU[4] 1500
Jan 9 22:55:54 gateway ppp[378]: tun0: LCP: MAGICNUM[6] 0x2e9e8316
Jan 9 22:55:54 gateway ppp[378]: tun0: LCP: AUTHPROTO[4] 0xc023 (PAP)
Jan 9 22:55:54 gateway ppp[378]: tun0: LCP: deflink: State change
Stopped --> Req-Sent
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: deflink: RecvConfigReq(2) state
= Req-Sent
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: ACCMAP[6] 0x000a0000
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: MAGICNUM[6] 0x0336d0d8
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: PROTOCOMP[2]
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: ACFCOMP[2]
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: CALLBACK[3] CBCP
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: deflink: SendConfigRej(2) state
= Req-Sent
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: CALLBACK[3] CBCP
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: deflink: RecvConfigReq(3) state
= Req-Sent
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: ACCMAP[6] 0x000a0000
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: MAGICNUM[6] 0x0336d0d8
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: PROTOCOMP[2]
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: ACFCOMP[2]
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: deflink: SendConfigAck(3) state
= Req-Sent
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: ACCMAP[6] 0x000a0000
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: MAGICNUM[6] 0x0336d0d8
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: PROTOCOMP[2]
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: ACFCOMP[2]
Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: deflink: State change
Req-Sent --> Ack-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: deflink: SendConfigReq(1) state
= Ack-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: ACFCOMP[2]
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: PROTOCOMP[2]
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: ACCMAP[6] 0x00000000
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: MRU[4] 1500
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: MAGICNUM[6] 0x2e9e8316
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: AUTHPROTO[4] 0xc023 (PAP)
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: deflink: RecvConfigAck(1) state
= Ack-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: deflink: State change
Ack-Sent --> Opened
Jan 9 22:55:57 gateway ppp[378]: tun0: LCP: deflink: LayerUp
Jan 9 22:55:57 gateway ppp[378]: tun0: Phase: bundle: Authenticate
Jan 9 22:55:57 gateway ppp[378]: tun0: Phase: deflink: his = none, mine =
PAP
Jan 9 22:55:57 gateway ppp[378]: tun0: Phase: Pap Input: REQUEST (bob)
Jan 9 22:55:57 gateway ppp[378]: tun0: Phase: Pap Output: SUCCESS
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: FSM: Using "deflink" as a
transport
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: State change
Initial --> Closed
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: LayerStart.
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: MPPE: Not usable without CHAP81
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: SendConfigReq(1) state
= Closed
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: [EMPTY]
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: State change
Closed --> Req-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: Phase: deflink: lcp -> open
Jan 9 22:55:57 gateway ppp[378]: tun0: Phase: bundle: Network
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: FSM: Using "deflink" as a
transport
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: State change
Initial --> Closed
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: LayerStart.
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: SendConfigReq(1)
state = Closed
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: IPADDR[6] 10.0.0.1
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: COMPPROTO[6] 16 VJ slots
with slot compression
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: State change
Closed --> Req-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: RecvConfigReq(1)
state = Req-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: COMPPROTO[6] 16 VJ slots
with slot compression
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: IPADDR[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: PRIDNS[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: PRINBNS[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: NBNS REQ - rejected - nbns not
set
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: SECDNS[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: SECNBNS[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: NBNS REQ - rejected - nbns not
set
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: SendConfigRej(1)
state = Req-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: PRINBNS[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: SECNBNS[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: RecvConfigReq(1) state
= Req-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: MPPE[6] value 0x00000001 (
bits, stateful, compressed)
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: MPPE: Not usable without CHAP81
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: STAC[5]
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: SendConfigRej(1) state
= Req-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: MPPE[6] value 0x00000001 (
bits, stateful, compressed)
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: STAC[5]
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: RecvConfigAck(1) state
= Req-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: State change
Req-Sent --> Ack-Rcvd
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: RecvConfigAck(1)
state = Req-Sent
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: State change
Req-Sent --> Ack-Rcvd
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: RecvConfigReq(2)
state = Ack-Rcvd
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: COMPPROTO[6] 16 VJ slots
with slot compression
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: IPADDR[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: PRIDNS[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: SECDNS[6] 0.0.0.0
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: deflink: SendConfigNak(2)
state = Ack-Rcvd
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: IPADDR[6] 10.0.0.74
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: PRIDNS[6] 208.206.15.11
Jan 9 22:55:57 gateway ppp[378]: tun0: IPCP: SECDNS[6] 208.206.15.12
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: RecvConfigReq(2) state
= Ack-Rcvd
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: [EMPTY]
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: SendConfigAck(2) state
= Ack-Rcvd
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: [EMPTY]
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: State change
Ack-Rcvd --> Opened
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: LayerUp.
Jan 9 22:55:57 gateway ppp[378]: tun0: CCP: deflink: Out =
<0xffffffff>[-1], In = <0xffffffff>[-1]
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: deflink: RecvConfigReq(3)
state = Ack-Rcvd
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: COMPPROTO[6] 16 VJ slots
with slot compression
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: IPADDR[6] 10.0.0.74
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: PRIDNS[6] 208.206.15.11
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: SECDNS[6] 208.206.15.12
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: deflink: SendConfigAck(3)
state = Ack-Rcvd
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: COMPPROTO[6] 16 VJ slots
with slot compression
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: IPADDR[6] 10.0.0.74
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: PRIDNS[6] 208.206.15.11
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: SECDNS[6] 208.206.15.12
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: deflink: State change
Ack-Rcvd --> Opened
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: deflink: LayerUp.
Jan 9 22:55:58 gateway ppp[378]: tun0: IPCP: myaddr 10.0.0.1 hisaddr =
10.0.0.74
Jan 9 22:55:58 gateway ppp[378]: tun0: CCP: deflink: RecvTerminateReq(3)
state = Opened
Jan 9 22:55:58 gateway ppp[378]: tun0: CCP: deflink: LayerDown.
Jan 9 22:55:58 gateway ppp[378]: tun0: CCP: deflink: SendTerminateAck(3)
state = Opened
Jan 9 22:55:58 gateway ppp[378]: tun0: CCP: deflink: State change
Opened --> Stopping
Jan 9 22:56:01 gateway ppp[378]: tun0: CCP: deflink: LayerFinish.
Jan 9 22:56:01 gateway ppp[378]: tun0: CCP: deflink: State change
Stopping --> Stopped

Waited 2 minutes for hangup & callback. I closed dialer window on win98 to
hangup connection.

Jan 9 22:58:31 gateway ppp[378]: tun0: LCP: deflink: RecvTerminateReq(4)
state = Opened
Jan 9 22:58:31 gateway ppp[378]: tun0: LCP: deflink: LayerDown
Jan 9 22:58:31 gateway ppp[378]: tun0: LCP: deflink: SendTerminateAck(4)
state = Opened
Jan 9 22:58:31 gateway ppp[378]: tun0: LCP: deflink: State change
Opened --> Stopping
Jan 9 22:58:31 gateway ppp[378]: tun0: CCP: deflink: State change
Stopped --> Closed
Jan 9 22:58:31 gateway ppp[378]: tun0: CCP: deflink: State change
Closed --> Initial
Jan 9 22:58:31 gateway ppp[378]: tun0: Phase: deflink: open -> lcp
Jan 9 22:58:31 gateway ppp[378]: tun0: IPCP: deflink: LayerDown: 10.0.0.1
Jan 9 22:58:31 gateway ppp[378]: tun0: IPCP: deflink: State change
Opened --> Starting
Jan 9 22:58:31 gateway ppp[378]: tun0: IPCP: deflink: LayerFinish.
Jan 9 22:58:31 gateway ppp[378]: tun0: IPCP: Connect time: 154 secs: 628
octets in, 504 octets out
Jan 9 22:58:31 gateway ppp[378]: tun0: IPCP: : 12 packets in, 9 packets out
Jan 9 22:58:31 gateway ppp[378]: tun0: IPCP: total 7 bytes/sec, peak 95
bytes/sec on Wed Jan 9 22:58:31 2002
Jan 9 22:58:31 gateway ppp[378]: tun0: IPCP: deflink: State change
Starting --> Initial
Jan 9 22:58:31 gateway ppp[378]: tun0: Phase: bundle: Terminate
Jan 9 22:58:31 gateway ppp[378]: tun0: Phase: deflink: Carrier lost
Jan 9 22:58:31 gateway ppp[378]: tun0: LCP: deflink: State change
Stopping --> Starting
Jan 9 22:58:31 gateway ppp[378]: tun0: LCP: deflink: LayerFinish
Jan 9 22:58:31 gateway ppp[378]: tun0: LCP: deflink: State change
Starting --> Initial
Jan 9 22:58:31 gateway ppp[378]: tun0: Phase: deflink: Disconnected!
Jan 9 22:58:31 gateway ppp[378]: tun0: Phase: deflink: Connect time: 159
secs: 1137 octets in, 941 octets out
Jan 9 22:58:31 gateway ppp[378]: tun0: Phase: deflink: : 34 packets in, 23
packets out
Jan 9 22:58:31 gateway ppp[378]: tun0: Phase: total 13 bytes/sec, peak 175
bytes/sec on Wed Jan 9 22:58:31 2002
Jan 9 22:58:31 gateway ppp[387]: tun0: Phase: deflink: lcp -> closed
Jan 9 22:58:31 gateway ppp[387]: tun0: Phase: bundle: Dead
Jan 9 22:58:31 gateway ppp[387]: tun0: Phase: PPP Terminated (normal).


-----Original Message-----
From: Brian Somers [mailto:br...@freebsd-services.com]
Sent: Wednesday, January 09, 2002 8:56 PM
To: Joe & Fhe Barbish
Cc: br...@Awfulhak.org; br...@freebsd-services.com
Subject: Re: How to setup dialin to server and them callback orginal dialin
caller

> Using 3 internal modems, 2 pci, 1 isa. 1 pci dialout to ISP, other 2
accept
> dialin to FBSD server. I have the dialin to FBSD server working. Trying to
> add callback function. Have callback phone number in 5th field of
> ppp.secret. I could find no documentation any place about how this process
> works. Thought modem that answered dialin call would hang-up and turn
around
> and dial phone number in ppp.secret for that id/pw that just logged in.
>
> Some old emails in questions archive said to look at
> /usr/share/examples/ppp/ppp.linkup.sample. I checked that out and it has
> nothing about callback. ppp.conf.sample has a section called
callback-server
> that looks like what is needed but there is no information on how to call
> this section. Found my way to http://www.awfulhak.org/ppp.html and it said
>
> If these pages aren't sufficient to get you up & running can you please
let
> me know so that I can do something about it. Well consider this email as
> letting you know about it. If you want to see my ppp.conf just let me
know.

Hi,

You should be able to just add the callback-server stuff to your
config.

Once the ``set callback cbcp'' bit has been seen by ppp (when it's
running in -direct mode), it'll negotiate callback with the client,
and will then attempt to make an outgoing call. To make the outgoing
call, it needs parameters such as ``set device'', ``set speed'',
``set dial'' etc - it doesn't try to use the device that ppp
-direct was started with, but closes that in favour of whatever ``set
device'' says.

I hope that makes a bit more sense.

> Thanks
> Joe

--
Brian <br...@freebsd-services.com> <br...@Awfulhak.org>
http://www.freebsd-services.com/ <brian@[uk.]FreeBSD.org>
Don't _EVER_ lose your sense of humour ! <brian@[uk.]OpenBSD.org>


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

Brian Somers

unread,
Jan 9, 2002, 11:27:24 PM1/9/02
to
> Brian
> I did like you said and ran a test. I dialed in ok like
> always but the callback did not happen. To get right to
> the point of making it function, you need to see what I
> have configured. To that ends I have included my ppp.conf
> and ppp.secret files with a ppp.log from my last test.
> Please give it a once over and see if you can identify
> what's wrong? Cuua2 is the dial in and callback device.
> My ppp.conf is heavyly commented for the jr people who work
> for me supporting this work enviroment.
>
> Thanks Joe
[.....]

> ppp.log of the test
>
> Jan 9 22:55:52 gateway ppp[378]: Phase: Using interface: tun0
> Jan 9 22:55:52 gateway ppp[378]: Phase: deflink: Created in closed state
> Jan 9 22:55:52 gateway ppp[378]: tun0: Command: default: set speed 115200
> Jan 9 22:55:52 gateway ppp[378]: tun0: Command: default: set timeout 0
> Jan 9 22:55:52 gateway ppp[378]: tun0: Command: default: disable pred1
> deflate lqr
> Jan 9 22:55:52 gateway ppp[378]: tun0: Command: default: deny pred1 deflate
> lqr
> Jan 9 22:55:52 gateway ppp[378]: tun0: Command: incoming: enable pap
> Jan 9 22:55:52 gateway ppp[378]: tun0: Command: incoming: accept dns
> Jan 9 22:55:52 gateway ppp[378]: tun0: Command: incoming: set ifaddr
> 10.0.0.1 10.0.0.74 255.255.255.255
[.....]

You're invoking ppp with the incoming profile rather than with the
callback-server profile. You should run

ppp -direct callback-server

from the ppplogin script.

The callback-server profile should also have a better ``set dial''
command - perhaps the one from your dialisp profile. The current set
dial will only wait 10 seconds for CONNECT.

The callback-server profile's first line is ``load''ing an
non-existent profile. I suspect it should say ``load incoming'' so
that it does things like ``allow users'' and ``set ifaddr'' etc.

[.....]


> Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: deflink: RecvConfigReq(2) state
> = Req-Sent
> Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: ACCMAP[6] 0x000a0000
> Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: MAGICNUM[6] 0x0336d0d8
> Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: PROTOCOMP[2]
> Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: ACFCOMP[2]
> Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: CALLBACK[3] CBCP
> Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: deflink: SendConfigRej(2) state
> = Req-Sent
> Jan 9 22:55:55 gateway ppp[378]: tun0: LCP: CALLBACK[3] CBCP

[.....]

This is the bit that goes wrong - ppp rejects the callback request
because it hasn't seen a ``set callback'' line....

Cheers.

Joe & Fhe Barbish

unread,
Jan 10, 2002, 12:35:57 AM1/10/02
to
Brian

OK so I leave every thing the way it is but change the incoming section like
this.

incoming:
allow users barbish bob
enable pap
accept dns


set ifaddr 10.0.0.1 10.0.0.74 255.255.255.255

set callback cbcp
set cbcp
set log +cbcp
set redial 3 1
set device /dev/cuaa2 /dev/cuaa1
set speed 115200

set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"

Now I need to understand the flow of things.

When the win98 box calls the dialin modem on the FBSD box, getty senses &
answers the call, makes the connection, tells the winbox it wants pap and
asks for id/pw, whatever is entered is checked against ppp.secret, at a
match ppp sees the callback phone number and hangs up the phone. Now the
modem that just answered the inbound call is free to dial out using the
callback phone number from ppp.secert. On the winbox when FBSD hung up the
dial window jumped up and asked if the user wants to dial again. The user
should just close the dialer window. The modem on the winbox must already
have the ats=1 turned on for auto answer. FBSD does it's callback and the
modem on the winbox picks up. FBSD does not request pap logon again or
anything. The winbox is all ready logged on from the first call in. If this
is not how it works then please explain the correct flow of events.

Thanks

Joe


-----Original Message-----
From: owner-freeb...@FreeBSD.ORG
[mailto:owner-freeb...@FreeBSD.ORG]On Behalf Of Brian Somers
Sent: Wednesday, January 09, 2002 11:26 PM
To: Joe & Fhe Barbish
Cc: Brian Somers; FBSD Questions; br...@freebsd-services.com
Subject: Re: How to setup dialin to server and them callback orginal dialin
caller

Brian Somers

unread,
Jan 10, 2002, 4:49:58 AM1/10/02
to

That's essentially it - from the FreeBSD end anyway. I'm not
familiar with how windows looks in this setup. I find it odd that
windows asks if you want to dial again.....

Joe & Fhe Barbish

unread,
Jan 10, 2002, 11:19:05 AM1/10/02
to
Brian,
Tested this change and it works like a charm. My description of
the flow was incorrect when it came to how win98 reacts.
I want to say thanks for your help.
Now to close out this thread with the complete solution so the
next person who wants to use the callback function will be able
to get the answer from the archives.

User ppp accept dialin and callback the originating caller so
FBSD server incurs the cost of the phone call. This breaks down
to 3 functional items that needs to be addressed in the ppp.conf file.
1. accepting a dial in call to server.
2. using dynamic IP address so configuration is simple
3. activating callback function.

Note: use adduser to add new users. Put the users in group network so
he can use dialin, also edit ppp.conf and add new user to "allow user"
statement in incoming: section.

Below is the ppp.conf file that accomplishes this.
Follow the comments about creating the dial in function.


Summary of the flow of things.

When the win98 box calls the dialin modem phone number on the FBSD box,
getty senses the call & answers, it makes the connection,


tells the winbox it wants pap and asks for id/pw,
whatever is entered is checked against ppp.secret, at a
match ppp sees the callback phone number and hangs up the phone. Now the
modem that just answered the inbound call is free to dial out using the

callback phone number from ppp.secert. On the winbox after the dial windows
displays message authenticating id and password the window will close after
login is achieved like normal. When the FBSD server sees the callback in the
ppp.secret file it talks to the winbox about setting up callback services.
The winbox will open a window for callback security with a un-changeable
Option high-lighted [Administrator specified waiting for callback].
The winbox user clicks on OK and the winbox hangs up the modem and
automatically reconfigures the winbox modem for inbound call waiting.
FBSD does it's callback using the ppp.secert callback phone number
associated
with the id/pw it just authorized from the inbound call. The modem on the
winbox picks up, some hand shaking goes on and bingo you are connected.

There are other callback options for non-win boxes. See ppp.conf example in
Usr/share/examples/ppp/ towards the end.


############################################################################
##
# /etc/ppp/ppp.conf File for dial out modem to ISP and Dial in modem for

# connection to this FBSD system and callback to originating mswindows
caller
# so FBSD server incurs the cost of the phone call.
#
# Written by Joe Barbish 1/10/2002


#
# This is a working ppp.conf file I use to dial in to my ISP and to connect
# my Win98 box by dialing in to this FBSD box and accessing the internet.
#

# This ppp.conf documentation is based on a fresh install of FBSD 4.4 with
# all file content as delivered with no user changes.
#

# NOTE Any FBSD documentation that says that the physical modem has to have
# it's default options profile set to, NO command echo ATE0 and NO results
# string ATQ1 and saved to the physical modems onboard non-volatile memory
# (NVRAM) or any references to using programs tip, Kermit, mgetty, or
minicom
# to perform the dial function is obsolete and out dated as of FBSD 4.0.

# command for testing auto logon to ISP provider.

# Ensure that "device" references the correct serial port
# for your modem. (cuaa0 = COM1, cuaa1 = COM2)
# Only needed for dial out device.

set device /dev/cuaa1

# This dial string is needed for ISP's which use standard Unix style
# login.

set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"

# edit the next three lines and replace the values with


# the values which have been assigned by your ISP.
# Needed for Unix, chap, and Pap style logins.

set phone 12345678 # only use this phone number
set authname barbish
set authkey xxxxxxxx


set redial 10 4 # if busy redial 4 times with 10 second pause

enable pap # select pap login authentication

# get dynamic IP address from ISP.
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0

# if ISP issues static IP address un-commnet this section and comment out
above

allow users barbish bob

enable pap # uses ppp.secret file

accept dns # give dialin connection access to dns lookup

# Assign static IP address to this dialin line


# 10.0.0.74 = static IP address for this dialin line
# 10.0.0.1 = IP address of this FBSD box

# set ifaddr 10.0.0.1 10.0.0.74 255.255.255.255

# I have 4 modems connected to com1-com4 for dialin access and activated


# ttyd0-ttyd3 in /etc/ttys file this ppp.conf section [incoming] will work
# as is. Set ifaddr command assigns dynamic IP address from a range of
# reserved IP address. 10.0.0.71 through 10.0.0.74 inclusive) is the
# IP address pool reserved for dialin users.

set ifaddr 10.0.0.1 10.0.0.71-10.0.0.74 255.255.255.0


# Activate microsoft callback feature triggered by callback phone
# numbers configured in /etc/ppp/ppp.secret (the 5th field):
#


set callback cbcp
set cbcp
set log +cbcp
set redial 3 1

set device /dev/cuaa2 /dev/cuaa1 # dev names of dialin modem pool


set speed 115200
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"


# /etc/ppp/ppp.secret

# Authname Authkey Peer's IP address Label Callback

barbish dogman
bob bob * * 12167295555

0 new messages