mephri
October 24, 2003, 2:27am
1
Is it possible to make my QNX6 machine as dial-up server (Remote Access Server)? What should I do to make that happen?
TIA
–meph++
Yes it is. I went with pppd and chat for answering. There is a complete thread on this at qdn.public.qnxrtp.os. Look for “pppd dial-in server” in the subject. Randy covers it very well.
noc
October 24, 2003, 5:11pm
3
To save you dig into the old NNTP posts, here are quotes from that thread:
I had already modified “/etc/system/enum/include/net” and replaced
“pttcpip” with “ptcpip” and added “ppppmgr” (this starts io-net with both
the -ptcpip and -ppppmgr flags at boot time). I also downloaded the latest
“pppd” program from QNX’s website.
I created a file called “/etc/ppp/pap-secrets” with the following
contents:
(above sets * for client, * for server, “” for secret and * for IP Address)
Created a file called “/etc/ppp/options” with the following contents:
lock
-detach
modem
crtscts
proxyarp
asyncmap 0
Created a file called “/etc/ppp/options.ser3” (my modem is /dev/ser3)
with the following contents:
10.1.1.21:10.1.1.30
(10.1.1.21 is the IP address of the server, 10.1.1.30 will be served up to
the incoming client)
Created a file called “/etc/answer” with the following contents (chat
script to auto answer modem):
RING ATA
CONNECT “”
Created a script called “/etc/run_pppd” with the following contents
(needed since pppd terminates after every session):
while true
do
/usr/sbin/pppd debug defaultroute 10.1.1.21:10.1.1.30 57600 connect
‘chat -vv -f/etc/answer’ /dev/ser3
done
(note use of chat script to answer incoming call).
I can now use dialup networking from a Windows machine to connect to the
server. Once connected, I can run the internal web application by using the
address: “http://10.1.1.21/ ”. I can also run ftp and telnet, even phindows,
but the latter is very slow due to 28.8 connection speed (I am looking into
ways to speed up the connection - I should be able to run 57,600).
Now, even though the above works and I can establish multiple connections
(serially), I am not sure whether I have set up pppd correctly.
First, why does pppd terminate after each connection? Is this normal?
Second, using the chat script is okay, but it causes a timeout every 45
seconds (if you look at the pppd output, you see that the program exits
every 45 seconds). I know I can increase the timeout value in the script,
but the help documentation doesn’t tell me what the max value is for
TIMEOUT. Isnt’ there a better way of doing this?
Finally, is the above secure? Does the configuration I am using cause pppd
to verify the user name and password in /etc/passwd, or do I have to
configure the system differently?
Thanks,
xtang:
Sorry, it is not secure. Anybody have the modem phone number could
connect in
You should use “+pap” and “login” option. The first force client
(you windows box) authenticate itself. The seconde just tell pppd
check /etc/passwd instead of /etc/ppp/pap-secret.
Thanks Xiaodan,
I will add the lines:
+pap
login
to my /etc/ppp/options file, so I can at least force a more secure login.
Do you know what the max value is for “-t” option to chat?
If I increase the timeout to a significant number of seconds, I can reduce
the frequency of restarting ppp.
xtang:
Looks to me “-t 0” will work for you.
Basically it calls “alarm()” on the timeout you gave. With “alarm(0)”, you
simply do not timeout.
Make sure you don’t have “TIMEOUT” keyword in your chat script. That will
cancel your command line option, and won’t allow you do a “0” timeout.
mephri
November 3, 2003, 3:18am
4
From where could I get the latest pppd daemon? I tried the procedure above but it still failed…
noc
November 3, 2003, 5:49am
5
Can you define “latest” ?
Every QNX release should include /usr/sbin/pppd. You probably can’t just copy pppd from a newer QNX to an older one.
I have seen lots of people with success using the pppd that comes with QNX6.
BTW, since you are trying to setup a dialup server, you might consider using tools like “mgetty”. There is actually a talk in qdn.public.qnxrtp.os today about this tool.
G’day again folks,
After mucking around with “Chat” and PPP we decided to port “mgetty” to work
with QNX 6. This works rather well. Mgetty when compiled with the AUTO_PPP
option, will answer the phone and run pppd with args as specified in
“options” file. Also this runs quite well from tinit after editing the tinit
config file.
Matt
You might want to contact Matt from ruzz.com to find out more …
mephri
November 3, 2003, 6:02am
6
Actually I was just referring to what Randy said (quoted in the previous reply). Maybe I should check the mgetty thing out ya. Hoping it’d be easier …
mephri
November 3, 2003, 6:33am
7
Seems that information above doesn’t fit with my condition, does it? Guess that Randy was using QNX4 rather than QNX6. That’s why it didn’t work. Am I correct?
noc
November 3, 2003, 6:56am
8
In the first line of Randy’s quote, he mentioned “/etc/system/enum/include/net”, so it is QNX6.
mephri
November 3, 2003, 9:48am
9
But some of the options in the /etc/ppp/options file are not supported by pppd on QNX6.2.1.
mephri
November 4, 2003, 6:55am
10
At last it works after I add a modem reset (ATZ) command and remove unnnecessary others.
I know pppd should be able to read /etc/passwd. This is done when you enable the flags login and +pap. Unfortunately, these are the options that are not working atm. At least, not on my 6.2.1 box. Does any one know if there is a newer ‘qnx’ version of pppd available that is able to read /etc/passwd. I really don’t want to use mgetty. I really like the ttys approach. Clean and simple.
TIA
xtang
November 4, 2003, 3:16pm
12
The problem is fixed later. But I am not sure where you can
get the fixed one “Next Release” for sure
In the mean time, your only solution would be prepare /etc/ppp/pap-secrets, it is plain text, but at least you
can restrict access (only allow root read) on it.
fmartens:
I know pppd should be able to read /etc/passwd. This is done when you enable the flags login and +pap. Unfortunately, these are the options that are not working atm. At least, not on my 6.2.1 box. Does any one know if there is a newer ‘qnx’ version of pppd available that is able to read /etc/passwd. I really don’t want to use mgetty. I really like the ttys approach. Clean and simple.
TIA