LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-11-2008, 03:57 AM   #1
sieira
Member
 
Registered: Dec 2007
Location: Alcalß de Henares (Madrid)
Distribution: Debian
Posts: 40

Rep: Reputation: 16
Exclamation Entablish a ppp connection with XP as server and linux as client


[I've retaken this, see my third post bellow]

I've been trying to do this for almost two weeks, seen thousands of forums and tutorials and (I guess) I'm a step away from getting it working.

I have to connect several linux powered pin-pads to a windows server.


Windows XP side:

(My XP is in spanish, so option names can differ from real ones, since are translated by my own).

I've created an advanced connection via "new connection daemon" in the networking section of the control panel with the configuration bellow:

- Allow inlet connections.
- Device: COM1 ---> Speed: 57600 -- Flow Control: None (Appropriate parameters for pin-pad's modem)
- Always allow direct connection devices without providing any password (no users selected)
- Allow callers to access my LAN
- Specify TCP/IP addresses ---> From 192.168.0.1 to 192.168.0.5
- Allow the caller to specify it's own address.


Linux side:


/etc/ppp/options
Code:
ttyS0
57600
debug
lock
noauth
nocrtscts
defaultroute
noipdefault
logfile /var/log/messages

/etc/ppp/windows.chat contains:

Code:
TIMEOUT 3
'' CLIENT\dCLIENT\c
CLIENTSERVER ''
It's perm are 644

What I run is:

Code:
#pppd local -detach :192.168.0.1 connect "chat -v -f/etc/ppp/windows.chat"

When running it, I get:

Code:
Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
LCP: timeout sending Config-Requests
Connection terminated.
/var/log/messages shows:

Code:
Serial connection established.
using channel 10
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
sent [LCP ConfigReq id=0x1 <asyncmap 0x0> <magic 0xb5312041> <pcomp> <accomp>]
LCP: timeout sending Config-Requests
Connection terminated.
Modem Hangup

Frame sharing:

Windows XP side

Using "Free serial monitor" http://www.serial-port-monitor.com/index.html I see:

Note: "respuesta" means response and "pedido" means request.

Code:
Respuesta:16/12/2008 12:46:34.79564 (+913.7969 seconds)

 43 4C 49 45 4E 54 43 4C 49 45 4E 54               CLIENTCLIENT    

Pedido:16/12/2008 12:46:35.04564 (+0.1250 seconds)

 43 4C 49 45 4E 54 53 45 52 56 45 52               CLIENTSERVER    

####################
Quote: Frames below don't always arrive in the server (once each 10 tries, more or less)
####################
Respuesta:16/12/2008 12:46:44.21764 (+9.1719 seconds)

 7E FF 7D 23 C0 21 7D 21 7D 21 7D 20 7D 34 7D 22   ~ }#└!}!}!} }4}"
 7D 26 7D 20 7D 20 7D 20 7D 20 7D 25 7D 26 4A 29   }&} } } } }%}&J)
 4C A4 7D 27 7D 22 7D 28 7D 22 46 84 7E 7E FF 7D   LĄ}'}"}(}"F„~~ }
 23 C0 21 7D 21 7D 21 7D 20 7D 34 7D 22 7D 26 7D   #└!}!}!} }4}"}&}
 20 7D 20 7D 20 7D 20 7D 25 7D 26 4A 29 4C A4 7D    } } } }%}&J)LĄ}
 27 7D 22 7D 28 7D 22 46 84 7E 7E FF 7D 23 C0 21   '}"}(}"F„~~ }#└!
 7D 21 7D 21 7D 20 7D 34 7D 22 7D 26 7D 20 7D 20   }!}!} }4}"}&} } 
 7D 20 7D 20 7D 25 7D 26 4A 29 4C A4 7D 27 7D 22   } } }%}&J)LĄ}'}"
 7D 28 7D 22 46 84 7E 7E FF 7D 23 C0 21 7D 21 7D   }(}"F„~~ }#└!}!}
 21 7D 20 7D 34 7D 22 7D 26 7D 20 7D 20 7D 20 7D   !} }4}"}&} } } }
 20 7D 25 7D 26 4A 29 4C A4 7D 27 7D 22 7D 28 7D    }%}&J)LĄ}'}"}(}
 22 46 84 7E 7E FF 7D 23 C0 21 7D 21 7D 21 7D 20   "F„~~ }#└!}!}!} 
 7D 34 7D 22 7D 26 7D 20 7D 20 7D 20 7D 20 7D 25   }4}"}&} } } } }%
 7D 26 4A 29 4C A4 7D 27 7D 22 7D 28 7D 22 46 84   }&J)LĄ}'}"}(}"F„
 7E 7E FF 7D 23 C0 21 7D 21 7D 21 7D 20 7D 34 7D   ~~ }#└!}!}!} }4}
 22 7D 26 7D 20 7D 20 7D 20 7D 20 7D 25 7D 26 4A   "}&} } } } }%}&J
 29 4C A4 7D 27 7D 22 7D 28 7D 22 46 84 7E 7E FF   )LĄ}'}"}(}"F„~~ 
 7D 23 C0 21 7D 21 7D 21 7D 20 7D 34 7D 22 7D 26   }#└!}!}!} }4}"}&
 7D 20 7D 20 7D 20 7D 20 7D 25 7D 26 4A 29 4C A4   } } } } }%}&J)LĄ
 7D 27 7D 22 7D 28 7D 22 46 84 7E 7E FF 7D 23 C0   }'}"}(}"F„~~ }#└
 21 7D 21 7D 21 7D 20 7D 34 7D 22 7D 26 7D 20 7D   !}!}!} }4}"}&} }
 20 7D 20 7D 20 7D 25 7D 26 4A 29 4C A4 7D 27 7D    } } }%}&J)LĄ}'}
 22 7D 28 7D 22 46 84 7E                           "}(}"F„~
The garbage strings are supposed to be the config-request string repeated several times

(7E FF 7D 23 C0 21 7D 21 7D 21 7D 20 7D 34 7D 22 7D 26 7D 20 7D 20 7D 20 7D 20 7D 25 7D 26 57 ED A5 B6 7D 27 7D 22 7D 28 7D 22 26 4E 7E)

Linux side

/var/log/ppp/log shows:

Code:
pppd 2.4.4 started by root, uid 0
timeout set to 3 seconds
send(CLIENT\dCLIENT)
expect(CLIENTSERVER)
CLIENTSERVER
-- got it
send(^M)
Serial connection established
using channel 5
Using interface ppp0
Connect ppp0 <--> /dev/ttyS0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x12345678> <pcomp> <accomp>]
last message repeated 9 times
LCP: timeout sending Config-Requests
If I call $ifconfig -a in the linux side while windows is receiving all this garbage that is supposed to be the configuration request, a non-configured network interface called ppp0 is shown (as expected):

Code:
ppp0 Link encap:Point-to-Point Protocol
     POINTOPOINT NOARP MULTICAST MTU:1500 Metric:1
     RX packets:0 errors:0 dropped:0 overruns:0 frame:0
     TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
     collisions:0 txqueuelen:3
     RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
I'm a little closer now, but again, don't know what to read to understand this... Microsoft doesn't provide any information about this kind of interconnection nor in spanish, english, portuguese or italian (or I'm not able to find it).

Best manual I've found (strongly recommendable indeed) is:

How to hook up PPP in Linux

Last edited by sieira; 02-25-2009 at 06:52 AM.
 
Old 12-13-2008, 08:36 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 11,455

Rep: Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315
"If I was you I wouldn't start from here at all" to quote the Kerryman asked for directions. If you establish a connection that gives nobody permission to do anything, and XP makes a poor server. They want you to buy their server versions.
 
Old 12-15-2008, 03:41 AM   #3
sieira
Member
 
Registered: Dec 2007
Location: Alcalß de Henares (Madrid)
Distribution: Debian
Posts: 40

Original Poster
Rep: Reputation: 16
Unfortunately, I can't take such a decision. I'm working in security-related stuff, and as some guy thought things would be securer is how I have to get things done (it use to be... not so secure... but simply weird).

I'm updating my first post, (since I've made some improvements, but not yet accomplished my goal :-p).

(By the way, Is it possible to change this thread's name?, I've just realized I wrote "entablish" instead of "establish".
 
Old 12-16-2008, 11:40 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 11,455

Rep: Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315
Have you tried putty? Available for windows too.

BTW, I'm a hardware guy. Tell him serial ports are a dangerous method of doing things - standards differ, they are not hot pluggable, and earth faults are not unknown. Or you can simply hotplug the serial port and blow it for him :-D.
 
Old 12-17-2008, 06:24 AM   #5
sieira
Member
 
Registered: Dec 2007
Location: Alcalß de Henares (Madrid)
Distribution: Debian
Posts: 40

Original Poster
Rep: Reputation: 16
By now I'm done with this. I'll have to retake it soon, thanks for the help
 
Old 12-17-2008, 06:43 AM   #6
sieira
Member
 
Registered: Dec 2007
Location: Alcalß de Henares (Madrid)
Distribution: Debian
Posts: 40

Original Poster
Rep: Reputation: 16
By now I'm done with this... I'll have to retake it soon, anyway.

I've being looking for the LCP frames structure, in order to analyze those that the pin-pad sends and try to figure out what's wrong here, but I couldn't find a good specification.

Does anybody know where to find this information?, I only found the structure [header][spam][data][spam][spam] (can't remember now) but no sizes or meanings, so useless for my purpose...

Thanks for the help, business_kid
 
Old 02-25-2009, 06:51 AM   #7
sieira
Member
 
Registered: Dec 2007
Location: Alcalß de Henares (Madrid)
Distribution: Debian
Posts: 40

Original Poster
Rep: Reputation: 16
Exclamation

Ok, back here again. Still can't connect, and still can't understand why.

Current situation is:

Windows inlet connection

Device: COM1
Not allowing VPN's
No users, but allowing direct conections from handy devices.

Allow callers access to my LAN.
Ips from xxx.xxx.x.1 to xxx.xxx.xxx.5

Not allowing caller to specify it's own IP

Linux side

windows.chat
Code:
TIMEOUT 3
"" CLIENT\dCLIENT\c

options

Code:
/dev/ttyS0
57600
debug
lock
nocrtscts
defaultroute
noipdefault
connect "/usr/sbin/chat -v -f/etc/ppp/windows.chat"
When I run pppd:
  1. CLIENT is sent from linux to windows
  2. CLIENT is sent again from linux to windows
  3. windows responds with CLIENTSERVER
  4. Linux sends LCP config request, windows gives it back without the last (8th) bit.
  5. This happens 10 times (this can be configured to persist longer, but it's useless despite I tried with 50 retrials)
  6. Linux stops persisting, and serial port gets blocked
  7. Windows shows no info about this process

I'm wondering if windows is expecting any other thing after the CLIENT CLIENTSERVER shacking, and before LCP negotiation.

This seems to be authentication stuff, but as you see, I've used the param noauth (for linux client not to authenticate windows server), and configured windows server to allow unidentified connections.

I'm really stucked at this point, and just don't know how to make this work... microsoft gives not any help, bout the telephone operator advice of purchasing XP for the client (which is absolutely impossible)

My apologies again for my english, hope you'll understand.
Thanks in advance

Last edited by sieira; 02-25-2009 at 06:54 AM.
 
Old 02-26-2009, 12:35 PM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 11,455

Rep: Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315
I can't fault your linux stuff. My amnesia is slowly lifting on windows boxen as I am having to work with the stuff now.

IIRC, you only have one default route in windows; If you have a lan connection, that will be the default, and I have always found other connections iffy at best. That said, I would remove ppp from the windows box if it's in network settings, and add it back as a protocol on the adapters where you need itĚ

It is also worth mentioning development on pppd has basically ceased since the advent of broadband, and that XP behaves very poorly as a chat server. If windows chat is not documented, it's hardly fixable.

I set up samba and discovered there was an invisible transaction where windows sent the username and password used to log on (really secure, huh?) in the samba negotiations to say 'this guy wants access' Instead of noauth in linux, I would try also the windows log on username/password just to eliminate it.

Lastly I would point to age of the software and say it's not feasible. You might do better to set up a linux terminal on the serial port and let him get in that way.
 
Old 02-27-2009, 02:10 AM   #9
sieira
Member
 
Registered: Dec 2007
Location: Alcalß de Henares (Madrid)
Distribution: Debian
Posts: 40

Original Poster
Rep: Reputation: 16
Smile

I've done it!!!, I just needed to add "" "" to the chat script; i.e.:

Code:
TIMEOUT 10
CLIENTSERVER CLIENT\dCLIENT\c
"" "\c"
windows was expecting me to send a carriage return before activating LCP, now, using the configuration above everything works.

Thanks a lot for your help

P.D: Not everything works; now, after the link is ready and transmits some frames, it goes down because linux and windows don't agree with the compression protocol (I would need to add mppe modules to the kernel (which is not possible with this version), now i'm looking for a server other than RAS, and W2K compatible.

Last edited by sieira; 03-24-2009 at 06:55 AM.
 
Old 02-28-2009, 03:00 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 11,455

Rep: Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315Reputation: 1315
If you have connected several things, Copy one of them!
Maybe the carriage return/line feed is at issue, and I would give the client a different ip like 192.168.0.5. Then I would go at the ppp options. There's a good explanation of them in the ppp howto up at section 11 or 12. By there he has finally got to the point.
 
  


Reply

Tags
ppp, pppd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to link linux ppp client to windows ppp server? cyz Linux - Networking 2 12-11-2008 05:01 AM
linux ppp client fails to connect to linux pptpd serve, works with windows vpn server wastingtime Linux - Server 3 09-20-2008 08:13 PM
ppp client cannot browes internet while connecting in the ppp dialin server joel17 Linux - Networking 0 09-04-2006 01:38 AM
Client connection to Linux server SPK Linux - Networking 0 08-15-2006 11:12 PM
A network client can't ping a foreign host via a ppp connection Leandro Linux - Networking 1 11-15-2002 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration