Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAC(10.15.5) unrecognized option '115200' #759

Closed
Vicnz03 opened this issue Jul 24, 2020 · 21 comments
Closed

MAC(10.15.5) unrecognized option '115200' #759

Vicnz03 opened this issue Jul 24, 2020 · 21 comments

Comments

@Vicnz03
Copy link

Vicnz03 commented Jul 24, 2020

Hi,
It's not working on my mac(10.15.5)
Please help.

INFO:   Connected to gateway.
INFO:   Authenticated.
INFO:   Remote gateway has allocated a VPN.
/usr/sbin/pppd: unrecognized option '115200'
pppd version 2.4.2
Usage: /usr/sbin/pppd [ options ], where options are:
        <device>    Communicate over the named device
        <speed>     Set the baud rate to <speed>
        <loc>:<rem> Set the local and/or remote interface IP
                    addresses.  Either one may be omitted.
        asyncmap <n>   Set the desired async map to hex <n>
        auth        Require authentication from peer
        connect <p>     Invoke shell command <p> to set up the serial line
        crtscts     Use hardware RTS/CTS flow control
        defaultroute   Add default route through interface
        file <f>    Take options from file <f>
        modem       Use modem control lines
        mru <n>     Set MRU value to <n> for negotiation
See pppd(8) for more options.

INFO:   Cleanup, joining threads...
ERROR:  pppd: An error was detected in processing the options given, such as two mutually exclusive options being used.
INFO:   Terminated pppd.
INFO:   Closed connection to gateway.
INFO:   Logged out.
@DimitriPapadopoulos
Copy link
Collaborator

Did it work for you on earlier macOS versions and then stopped working?

We always pass the following options to pppd:

115200
:192.0.2.1
noipdefault
noaccomp
noauth
default-asyncmap
nopcomp
receive-all
nodefaultroute
nodetach
lcp-max-configure 40
mru 1354

It looks like 115200 is not recognized as an option anymore. Strange. It used to work on all supported platforms, Linux, FreeBSD, mac0S.

@DimitriPapadopoulos
Copy link
Collaborator

I can see that macOS 10.15.3 runs ppp-862, the same as macOS 10.15. Nothing has changed much recently.

pppd version 2.4.2

But wait... Why does pppd identify itself as version 2.4.2? Its version number is supposed to be 862 - besides I think pppd prints no version at all on macOS. Which pppd program are you running? What is the output of which pppd? Have you installed your own pppd program?

@DimitriPapadopoulos
Copy link
Collaborator

And finally which version of openfortivpn is this? Have you installed it from Homebrew or compiled it yourself?

@mrbaseman
Copy link
Collaborator

mrbaseman commented Jul 24, 2020

We have increased the value in #444 some time ago as an attempt to fix #428 but others have tested with this change in the meantime, at least on Mojave.
Did it work on your Mac with an earlier version of openfortivpn (before 1.10.0)?

Oh, our messages have crossed...

@mrbaseman
Copy link
Collaborator

/usr/sbin/pppd is in the provided debug output, but version 2.4.2 is a good point...

@Vicnz03
Copy link
Author

Vicnz03 commented Jul 24, 2020

I installed it from Homebrew just today. Didn't change anything about pppd.

openfortivpn-master sudo /usr/sbin/pppd 115200:192.0.2.1 noipdefault noaccomp default-asyncmap nopcomp receive-all nodefaultroute nodetach lcp-max-configure 40 mru 1354
Password:
Fri Jul 24 22:06:46 2020 : publish_entry SCDSet() failed: Success!
Fri Jul 24 22:06:46 2020 : publish_entry SCDSet() failed: Success!
Fri Jul 24 22:06:46 2020 : L2TP: No remote address supplied...
‚ûú  openfortivpn-master which pppd
/usr/sbin/pppd

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented Jul 24, 2020

Have you run the following command? Note that a space is missing between 115200 and :192.0.2.1:

openfortivpn-master sudo /usr/sbin/pppd 115200:192.0.2.1 noipdefault noaccomp default-asyncmap nopcomp receive-all nodefaultroute nodetach lcp-max-configure 40 mru 1354
Password:
Fri Jul 24 22:06:46 2020 : publish_entry SCDSet() failed: Success!
Fri Jul 24 22:06:46 2020 : publish_entry SCDSet() failed: Success!
Fri Jul 24 22:06:46 2020 : L2TP: No remote address supplied...

@Vicnz03
Copy link
Author

Vicnz03 commented Jul 24, 2020

Yes. if i run with space , will get same error

openfortivpn-master sudo /usr/sbin/pppd 115200 :192.0.2.1 noipdefault noaccomp default-asyncmap nopcomp receive-all nodefaultroute nodetach lcp-max-configure 40 mru 1354
Password:
/usr/sbin/pppd: unrecognized option '115200'
pppd version 2.4.2
Usage: /usr/sbin/pppd [ options ], where options are:
        <device>    Communicate over the named device
        <speed>     Set the baud rate to <speed>
        <loc>:<rem> Set the local and/or remote interface IP
                    addresses.  Either one may be omitted.
        asyncmap <n>   Set the desired async map to hex <n>
        auth        Require authentication from peer
        connect <p>     Invoke shell command <p> to set up the serial line
        crtscts     Use hardware RTS/CTS flow control
        defaultroute   Add default route through interface
        file <f>    Take options from file <f>
        modem       Use modem control lines
        mru <n>     Set MRU value to <n> for negotiation
See pppd(8) for more options.

@DimitriPapadopoulos
Copy link
Collaborator

OK, can you re-run the command with 38400 instead of 115200?

@Vicnz03
Copy link
Author

Vicnz03 commented Jul 24, 2020

same

sudo /usr/sbin/pppd 38400 :192.0.2.1 noipdefault noaccomp default-asyncmap nopcomp receive-all nodefaultroute nodetach lcp-max-configure 40 mru 1354 
Password:
Sorry, try again.
Password:
/usr/sbin/pppd: unrecognized option '38400'

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented Jul 24, 2020

That's perhaps because <device> is missing from your command, openfortivpn adds it after the above mentioned code. But then the error is the same when openfortivpn runs pppd. That's really strange.

I have been given access to a mac to test pppd but unfortunately it looks like it is broken in this mac, not sure how to fix this:

$ /usr/sbin/pppd -h
/usr/sbin/pppd: Can't open options file /etc/ppp/options: No such file or directory
$ 

I'm afraid I cannot offer any advice. I don't understand why this has never been reported before.

@nehaljwani
Copy link
Contributor

@DimitriPapadopoulos You have to run it with sudo:

~ ❯❯❯ /usr/sbin/pppd --help
/usr/sbin/pppd: Can't open options file /etc/ppp/options: No such file or directory

~ ❯❯❯ sudo /usr/sbin/pppd --version
pppd version 2.4.2 (Apple version 862)

~ ❯❯❯ sudo /usr/sbin/pppd --help
pppd version 2.4.2
Usage: /usr/sbin/pppd [ options ], where options are:
	<device>	Communicate over the named device
	<speed>		Set the baud rate to <speed>
	<loc>:<rem>	Set the local and/or remote interface IP
			addresses.  Either one may be omitted.
	asyncmap <n>	Set the desired async map to hex <n>
	auth		Require authentication from peer
        connect <p>     Invoke shell command <p> to set up the serial line
	crtscts		Use hardware RTS/CTS flow control
	defaultroute	Add default route through interface
	file <f>	Take options from file <f>
	modem		Use modem control lines
	mru <n>		Set MRU value to <n> for negotiation
See pppd(8) for more options.

@DimitriPapadopoulos
Copy link
Collaborator

I don't have sudo rights but you do seem to have standard pppd software. If it works on other macOS machines but not yours, I really don't know why. Unless there haven't been other reports because this is an issue with very recent macOS versions.

In any case pppd is not much different from what we have on Linux:

$ sudo pppd --help
pppd version 2.4.7
Usage: pppd [ options ], where options are:
	<device>	Communicate over the named device
	<speed>		Set the baud rate to <speed>
	<loc>:<rem>	Set the local and/or remote interface IP
			addresses.  Either one may be omitted.
	asyncmap <n>	Set the desired async map to hex <n>
	auth		Require authentication from peer
        connect <p>     Invoke shell command <p> to set up the serial line
	crtscts		Use hardware RTS/CTS flow control
	defaultroute	Add default route through interface
	file <f>	Take options from file <f>
	modem		Use modem control lines
	mru <n>		Set MRU value to <n> for negotiation
See pppd(8) for more options.
$ 
```

@nehaljwani
Copy link
Contributor

I updated macOS to 10.15.6 and the version has updated (but not able to reproduce the issue):

~/r/openfortivpn ❯❯❯ sudo /usr/sbin/pppd --version
pppd version 2.4.2 (Apple version 862.140.2)

@Vicnz03 Could you try updating to 10.15.6?

@Vicnz03
Copy link
Author

Vicnz03 commented Jul 26, 2020

Upgraded to 10.15.6.

‚ûú  ~ sudo /usr/sbin/pppd --version                                                                                                                       
pppd version 2.4.2 (Apple version 862.140.2)

still the same issue

@DimitriPapadopoulos
Copy link
Collaborator

@nehaljwani Just to make sure I have got it right: I understand you cannot reproduce this issue after upgrading to 10.15.6. Were you able to reproduce it with mac0S 10.15.5 before upgrading?
@Vicnz03 I suspect this is specific to your machine. For example you may have installed software which overwrites parts of pppd, or you have modified the parameters of pppd for some other purpose. What is the "locale" of your machine? Chinese? Perhaps it's specific to the Chinese locale.

@nehaljwani
Copy link
Contributor

nehaljwani commented Jul 27, 2020

I was never able to reproduce it. My previous version was 10.15.1

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented Jul 27, 2020

@Vicnz03 Then it looks like a problem with your machine. Again, perhaps something related to the "locale", to other software that has modified the system, or to custom parameters somewhere. I'm sorry I cannot be of more help. Perhaps you can find explanations in the system logs. Or perhaps you can compare the pppd-related files to the same files on some other Apple machine that just works.

@Vicnz03
Copy link
Author

Vicnz03 commented Jul 29, 2020

Thanks guys. Looks like something wrong with my mac. Thanks for your help.

@Vicnz03
Copy link
Author

Vicnz03 commented Jul 29, 2020

Found out it's because I created a /etc/ppp/options. The VPN is working now after deleted it.

@DimitriPapadopoulos
Copy link
Collaborator

Great! It looks like pppd does not like parsing an empty /etc/ppp/options file, even though actual options are passed as actual command line arguments. Good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants