How to set up dial in and out with mgetty

How to set up dial in and out with mgetty

Post by tyk » Sun, 31 Dec 1899 09:00:00



Hi,
i'm trying to setup my linux box RH6.0 to be able to dial out and in
(off course not at the same time) using the same modem a USR 56K.
When i have the mgetty running i can dial into the linux but i can't
dial out with cron.(I have a cron job dialing out to my isp on the
hour using ppp-on script). The /var/log/message says

/var/log/messages

        ###  ppp-on started manually - OK

Nov  9 09:13:55 postman kernel: CSLIP: code copyright 1989 Regents of
the University of California
Nov  9 09:13:55 postman kernel: PPP: version 2.3.3 (demand dialling)
Nov  9 09:13:55 postman kernel: PPP line discipline registered.
Nov  9 09:13:55 postman kernel: registered device ppp0
Nov  9 09:13:55 postman pppd[11190]: pppd 2.3.7 started by root, uid 0
Nov  9 09:13:56 postman chat[11192]: timeout set to 3 seconds
Nov  9 09:13:56 postman chat[11192]: send (AT^M)
Nov  9 09:13:56 postman chat[11192]: expect (OK)
Nov  9 09:13:56 postman chat[11192]: AT^M^M
Nov  9 09:13:56 postman chat[11192]: OK
Nov  9 09:13:56 postman chat[11192]:  -- got it
Nov  9 09:13:56 postman chat[11195]: abort on (\nBUSY\r)
Nov  9 09:13:56 postman chat[11195]: abort on (\nNO ANSWER\r)
Nov  9 09:13:56 postman chat[11195]: abort on
(\nRINGING\r\n\r\nRINGING\r)
Nov  9 09:13:56 postman chat[11195]: send (ATDT0198303030^M)
Nov  9 09:13:56 postman chat[11195]: expect (CONNECT)
Nov  9 09:13:56 postman chat[11195]: ^M
Nov  9 09:14:25 postman chat[11195]: ATDT0198303030^M^M
Nov  9 09:14:25 postman chat[11195]: CONNECT
Nov  9 09:14:25 postman chat[11195]:  -- got it
Nov  9 09:14:25 postman chat[11195]: send (^M)
Nov  9 09:14:25 postman pppd[11190]: Serial connection established.
Nov  9 09:14:25 postman pppd[11190]: Using interface ppp0
Nov  9 09:14:25 postman pppd[11190]: Connect: ppp0 <--> /dev/ttyS0
Nov  9 09:14:26 postman pppd[11190]: Remote message: ^D^EM-t^B^F
Nov  9 09:14:26 postman modprobe: can't locate module ppp-compress-21
Nov  9 09:14:26 postman modprobe: can't locate module ppp-compress-26
Nov  9 09:14:26 postman modprobe: can't locate module ppp-compress-24
Nov  9 09:14:26 postman pppd[11190]: Unsupported protocol (0x802b)
received
Nov  9 09:14:27 postman pppd[11190]: local  IP address 203.40.35.68
Nov  9 09:14:27 postman pppd[11190]: remote IP address 144.130.30.226
Nov  9 09:17:26 postman pppd[11190]: Connection terminated.
Nov  9 09:17:26 postman pppd[11190]: Connect time 3.1 minutes.
Nov  9 09:17:26 postman pppd[11190]: Sent 374 bytes, received 485
bytes.
Nov  9 09:17:26 postman pppd[11190]: Hangup (SIGHUP)
Nov  9 09:17:26 postman pppd[11190]: Exit.

        ## ## remote login fine with mgetty

Nov  9 09:18:21 postman mgetty[11271]: data dev=ttyS0, pid=11271,
caller='none', conn='31200/ARQ/V34/LAPM/V42BIS', name='',
cmd='/bin/login', user='kim'
Nov  9 09:18:26 postman PAM_pwdb[11271]: (login) session opened for
user kim by (uid=0)
Nov  9 09:20:09 postman PAM_pwdb[11230]: (login) session closed for
user kim
Nov  9 09:20:44 postman PAM_pwdb[11271]: (login) session closed for
user kim

        ### cron starting ppp-on - does not connect

Nov  9 09:30:00 postman kernel: PPP: ppp line discipline successfully
unregistered
Nov  9 09:30:00 postman kernel: CSLIP: code copyright 1989 Regents of
the University of California
Nov  9 09:30:00 postman kernel: PPP: version 2.3.3 (demand dialling)
Nov  9 09:30:00 postman kernel: PPP line discipline registered.
Nov  9 09:30:00 postman kernel: registered device ppp0
Nov  9 09:30:00 postman mgetty[11304]: tcgetattr failed: Input/output
error
Nov  9 09:30:00 postman mgetty[11304]: tcsetattr failed: Input/output
error
Nov  9 09:30:10 postman mgetty[11304]: tcsetattr failed: Input/output
error
Nov  9 09:30:20 postman kernel: PPP: ppp line discipline successfully
unregistered

#####  /var/log/mgetty.ttyS0

--
11/09 09:17:35 yS0  mgetty: experimental test release 1.1.14-Apr02
11/09 09:17:35 yS0  check for lockfiles
11/09 09:17:35 yS0  locking the line
11/09 09:17:35 yS0  lowering DTR to reset Modem
11/09 09:17:36 yS0  send: \dATQ0V1H0[0d]
11/09 09:17:36 yS0  waiting for ``OK'' ** found **
11/09 09:17:37 yS0  send: ATS0=0Q0&D3&C1[0d]
11/09 09:17:37 yS0  waiting for ``OK'' ** found **
11/09 09:17:37 yS0  waiting...
11/09 09:18:07 yS0  waiting for ``RING'' ** found **
11/09 09:18:07 yS0  send: ATA[0d]
11/09 09:18:07 yS0  waiting for ``CONNECT'' ** found **
11/09 09:18:18 yS0  send:
11/09 09:18:18 yS0  waiting for ``_'' ** found **
11/09 09:18:21 ##### data dev=ttyS0, pid=11271, caller='none',
conn='31200/ARQ/V34/LAPM/V42BIS', name='', cmd='/bin/login',
user='kim'

--
11/09 09:20:44 yS0  mgetty: experimental test release 1.1.14-Apr02
11/09 09:20:44 yS0  check for lockfiles
11/09 09:20:44 yS0  locking the line
11/09 09:20:45 yS0  lowering DTR to reset Modem
11/09 09:20:45 yS0  send: \dATQ0V1H0[0d]
11/09 09:20:46 yS0  waiting for ``OK'' ** found **
11/09 09:20:46 yS0  send: ATS0=0Q0&D3&C1[0d]
11/09 09:20:46 yS0  waiting for ``OK'' ** found **
11/09 09:20:47 yS0  waiting...
11/09 09:30:00 yS0  tcgetattr failed: Input/output error
11/09 09:30:00 yS0  tcsetattr failed: Input/output error
11/09 09:30:00 yS0  waiting for ``RING''
11/09 09:30:10 yS0  timeout in chat script, waiting for `RING'
11/09 09:30:10 yS0  tcsetattr failed: Input/output error
11/09 09:30:10 yS0  huh? Junk on the line?
--

Thanks

 
 
 

How to set up dial in and out with mgetty

Post by M. Buchenried » Sun, 31 Dec 1899 09:00:00


[Note FollowUp-To: header]


>Hi,
>i'm trying to setup my linux box RH6.0 to be able to dial out and in
>(off course not at the same time) using the same modem a USR 56K.
>When i have the mgetty running i can dial into the linux but i can't
>dial out with cron.(I have a cron job dialing out to my isp on the
>hour using ppp-on script). The /var/log/message says

Please show us the crontab line that you are using, as well
as the ppp-on script.

Quote:>/var/log/messages
>    ###  ppp-on started manually - OK
>Nov  9 09:13:55 postman kernel: CSLIP: code copyright 1989 Regents of
>the University of California
>Nov  9 09:13:55 postman kernel: PPP: version 2.3.3 (demand dialling)
>Nov  9 09:13:55 postman kernel: PPP line discipline registered.
>Nov  9 09:13:55 postman kernel: registered device ppp0
>Nov  9 09:13:55 postman pppd[11190]: pppd 2.3.7 started by root, uid 0

pppd started by root. OK.

[...]

[...]

Quote:>    ### cron starting ppp-on - does not connect
>Nov  9 09:30:00 postman kernel: PPP: ppp line discipline successfully
>unregistered
>Nov  9 09:30:00 postman kernel: CSLIP: code copyright 1989 Regents of
>the University of California
>Nov  9 09:30:00 postman kernel: PPP: version 2.3.3 (demand dialling)
>Nov  9 09:30:00 postman kernel: PPP line discipline registered.
>Nov  9 09:30:00 postman kernel: registered device ppp0

You are not starting this as user root. Either you're calling up
"sudo" to get it working, or you're calling up the wrong chat/pppd
version.

Quote:>Nov  9 09:30:00 postman mgetty[11304]: tcgetattr failed: Input/output
>error

[...]

This is not a mgetty error, it simply means that the program that
tried accessing the port didn't have the correct priviledges to do
so. Check the permissions and user/group IDs of the device itself,
the pppd and chat programs, and /var/lock .

Quote:>--
>11/09 09:20:44 yS0  mgetty: experimental test release 1.1.14-Apr02
>11/09 09:20:44 yS0  check for lockfiles
>11/09 09:20:44 yS0  locking the line
>11/09 09:20:45 yS0  lowering DTR to reset Modem
>11/09 09:20:45 yS0  send: \dATQ0V1H0[0d]
>11/09 09:20:46 yS0  waiting for ``OK'' ** found **
>11/09 09:20:46 yS0  send: ATS0=0Q0&D3&C1[0d]
>11/09 09:20:46 yS0  waiting for ``OK'' ** found **
>11/09 09:20:47 yS0  waiting...
>11/09 09:30:00 yS0  tcgetattr failed: Input/output error
>11/09 09:30:00 yS0  tcsetattr failed: Input/output error
>11/09 09:30:00 yS0  waiting for ``RING''
>11/09 09:30:10 yS0  timeout in chat script, waiting for `RING'
>11/09 09:30:10 yS0  tcsetattr failed: Input/output error
>11/09 09:30:10 yS0  huh? Junk on the line?

[...]

...and this is the result: No lockfile generated, therefor
"junk on the line" from mgetty's point of view.

Michael
--

          Lumber Cartel Unit #456 (TINLC) & Official Netscum
    Note: If you want me to send you email, don't munge your address.

 
 
 

1. Setting up firewall for dial-ins: How?

Hi,

suppose I want to set up a "telecommuting" environment, so that people
with PCs or Macs at home can log into the corporate network.
I can't see any major problems on the client side, but what about the
server side? I'd like the setup reflect that of our companie's connection
to the Internet - there's a firewall that basically acts as a router.
Similarly, I'd like the server to "route" dialins to specific hosts.
Are there any guidelines for such a setup, especially with respect to
security?
I'm also interested in people's opinion on what kind of hardware and
software would be required on the server side, e.g. what kinds of serial
cards, how many dialup-lines per so and so many people, security software
(for instance, there has been a discussion on the TIS firewall toolkit -
could I use it?), and other things I most certainly forgot to mention.

Somebody willing to share his/her experience?

chr

---------------------------------------------------------------------------

Siemens AG, Munich, Germany  |             +49-89-636-44519
---------------------------------------------------------------------------

2. Sendmail Problem

3. Need Help on setting up getty for dial-ins

4. Security Vulnerability in SNMP (rev. 10)

5. More page outs than page ins?

6. How to join lines

7. Unix Libraries Ins/Outs

8. Matrox Video Drivers

9. Problems with dialing out when dial-ins are enabled

10. How to set up dial in and out with mgetty

11. Help Setting Up mgetty for dial-in access

12. 2.3 -> 2.7 via Dial-up (Re: CVS over 'dropping' dial-ups)

13. Preventing Dial outs.