LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Connecting to a dial in server (https://www.linuxquestions.org/questions/linux-networking-3/connecting-to-a-dial-in-server-189511/)

MS3FGX 06-03-2004 10:32 PM

Connecting to a dial in server
 
Ok, here is the situation.

I have a Slackware server setup at work that is on a public IP and connected to the internet with a T1. I log into it with SSH if I want to work on it while away from the office.

Well, that is all well and good when I have net access, but sometimes all I have is my laptop with me on the road, so I wanted to setup the server for dial in access.

Ok, so the server has it's own dedicated phone line. Connected to the phone line is an external US Robotics modem. The modem is connected to the second serial port.

In /etc/inittab I have the following line:

Code:

d2:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS1 vt100
That is the default Slackware dialup line, I just uncommented it.

ps -A shows "login" is running on ttyS1

So, everything is setup.

I dial the server's dedicated phone number with minicom on my laptop, and the modem picks up, and I get the infamous dial up noises. Minicom then plays a little tune, and it says that it is connected.

...

Then nothing happens.

There is no login prompt, and I can't seem to be able to do anything other than hang up.

What am I doing wrong? As I understand it, PPP is only required for internet access through dial up, but all I want is a console prompt, so I shouldn't need it.

If I run minicom on the server and the laptop at the same, I can type text back and forth between the machines, so I know it can't be a hardware issue.

Anybody know what I need to do?

kbcnetau 06-03-2004 10:41 PM

If I remember correctly, I think that mgetty is the best solution for dialling in. Here's a link to an article describing something like what you're trying to do:
<http://www.sprint.net.au/~terbut/use...ettydialin.htm>

An alternative to dialling in to an Internet connected server it to use a cheap ISP account on your roaming machine and use VPN (Virtual Private Networking) such as FreeSwan to get into your own network through the Internet.

MS3FGX 06-03-2004 10:48 PM

I have heard that mgetty works well, but Slackware comes with agetty, and like I said, the dialup line is in /etc/inittab by default, so it must work.

And I could use an ISP and go in trough SSH like normal, but if I can dial in directly, I can do it for free. Well, as long as I am not far enough away so that it is a long distance call.

And actually, if I can get this to work, I could then implement PPP and have my own one-line ISP that I can use.

kbcnetau 06-03-2004 11:00 PM

Have you read the HOWTO? <http://www.tldp.org/HOWTO/Modem-HOWTO-12.html>

I've just had a look around with Google and nobody seems to like agetty - it might be easier for you to install mgetty as there is more documentation for what you are trying to do. I've found that just because something's in the distro, doesn't mean to say it's good; I've ditched any number of SuSE rpms in favour of a) compiling from source, b) other packages.

Wow - you get free local phone calls? We only get it free until someone answers ;-) If we had that, I think I'd set up as an ISP and share my ADSL with the 99% of the folks round here who can't get it...

Anyhow - any agetty experts on the forum?

MS3FGX 06-03-2004 11:02 PM

I followed that guide, but it doesn't give too much information as to how to actually connect to the server after it is setup. It just says to dial in to the server with minicom.

I am actually looking for numbers for dial in machines (old BBS servers) to see if my minicom configuration is working on the laptop. Not going to well yet though.

kbcnetau 06-03-2004 11:09 PM

Minicom will just check your connection, giving you a straight terminal session, making sure that the remote end answers, etc.

What I think you want, is to establish a ppp network session. Here's another page that I found through Google that actually addresses the ppp issue: <http://www.swcp.com/~jgentry/pers.html>

MS3FGX 06-03-2004 11:13 PM

Minicom will just check your connection, giving you a straight terminal session, making sure that the remote end answers, etc.

That is exactly what I want. I want to be able to dial in and get a "login:" prompt so I can work on the server remotely. I don't want to access the internet though the dialup connection.

MS3FGX 06-03-2004 11:23 PM

Alright, how about this.

Could I run mgetty only on the dial up line? Or do I have to switch all of the consoles over to mgetty? The reason I ask is because this server is in active daily use, and I really can't afford any down time with it, and it seems that changing all the consoles over would be an involved process.

kbcnetau 06-03-2004 11:34 PM

Ah - we were working at cross-purposes; it's a long time since I was using serial terminals and serial dial-in. Let's think back:

So, you dial up, you get noises, you get no login; you're getting to the remote modem so a) minicom is OK, b), local modem is OK, c) remote modem is OK.

Things I'd try:
* use a fixed baud rate (only one entry) at both ends, just to get you going. If it won't work at 9600 8-1-none, it probably won't work at all...
* a connection to the remote modem doesn't mean a connection to the computer; it's possible that the server isn't getting the carrier detect from the modem - check your cables or, even better, use a breakout box if you have one, between the modem and the server.
* using a crossover cable, try a direct connection from your laptop to your server, taking the modems out of the equation. As soon as the server getty sees the carrier, you should get either login: or a load of heiroglyphics if your speed/parity is set wrong.

kbcnetau 06-03-2004 11:39 PM

Quote:

Could I run mgetty only on the dial up line?
Yes - every console can have something different. This means that, provided that you have enough serial ports, you can run straight serial modem sessions, fax modems, ppp modem sessions all at the same time.

Looking at the commented-out examples in my /etc/inittab, I see references to mingetty, mgetty, faxgetty and vboxgetty - with the 8-port Stallion card on my machine I could run all of them if I wanted to!

MS3FGX 06-03-2004 11:44 PM

Tomorrow when I have local access to the machine, I will try and get mgetty up on the dial in line.

At least there is more documentation for that. I would really like to get this setup for the weekend, when I will be away from the server.

MS3FGX 06-04-2004 12:37 PM

Well, I setup mgetty on the line, and it does the exact same thing...

Modems, squeal, I get a connected message, and nothing happens.

I must be missing something here, does anybody know how to get this running properly?

MS3FGX 06-04-2004 01:45 PM

Ok, I have managed to make some progress.

I have switched to a different external modem and set it so it doesn't auto answer. I am using mgetty with pretty much default settings.

The server picks up and I see a slightly odd looking version of my /etc/issue file, and a login: prompt, however, I can't seem to interact with it at all. I type my username and hit enter, and nothing happens. The last thing that the mgetty log says is:

waiting for "_" ** found **

That is all it says until I hang up, and then it just logs the modem reseting after it gets "NO CARRIER".

No wonder people don't do dial-up terminals anymore.

mdriftmeyer 06-04-2004 04:26 PM

So how are you authenticating your laptop onto the Server that hosts the Modem?

Maybe I'm looking at this the wrong way, but regardless of whether the T1 system acts as a nameserver to allow your laptop a connection to the Internet you still have to have access to the Server's intranet, so-to-speak.

Why not make sure DHCP is being vended from the Server to the client and authenticating it on the network (The Server specifically) so that you can access the machine via ssh?

That way with ip-up script you can view error logs via ppp-ipupdown.log.

kbcnetau 06-05-2004 01:38 AM

Yep - we gave up on dial-in stuff over ten years ago and went to having PPP dial-in via a dedicated box called a Lanrover.

Have you got any lights on the server modem? If so, does your RXD flicker when you hit keys in minicom?

If you can get your hands on a breakout box, you could at least make sure that your keystrokes are actually getting to the server. You can chase your tail for hours fiddling with software, but a few flashing lights can give you an instant health-check.


All times are GMT -5. The time now is 10:37 AM.