Skip to content

Commit

Permalink
review README text
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lippi committed Apr 7, 2020
1 parent 9c53626 commit 84eb185
Showing 1 changed file with 28 additions and 18 deletions.
46 changes: 28 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,30 @@ Freely inspired by:
* https://github.com/loune/php-ntlm/


It's support only Domain Controller proxy.
## Features

* Domain Controller support only (not LDAP);
* authenticate user credentials (not other checks);
* AD groups not supported.


## Installation

1. git clone https://github.com/davelip/php-ntlm-proxy.git
1. composer install
1. cp .env.example .env
1. modify .env with your own configurations
1. run the server: php server
1. `$ git clone https://github.com/davelip/php-ntlm-proxy.git` # clone the repository
1. `$ cd php-ntlm-proxy` # enter directory
1. `$ composer install` # install dependendancies
1. `$ cp .env.example .env` # copy configuration file
1. `$ vim .env` # and insert your own configuration
1. `$ php server` # run the server

## Test

You can test the connection in two ways:
You can test the server connection in two ways (replace 8445 with the port you set in your configuration file):

# netstat -plunt | grep `port`
`$ sudo netstat -plunt | grep 8445`
If you see a row in the output your server is running

# telnet localhost `port`
`$ telnet localhost 8445`
If you enter in interactive mode your server is running and you are communicating with him. Try to write something like `type1 123 AAAAA` and press Enter. You should get something like `Generic errorConnection closed by foreign host.`

For a production environment I suggest to install a tool like supervisord or to run php-ntlm-proxy like a system service (see next paragraphs).
Expand All @@ -34,15 +41,13 @@ http://supervisord.org/

Install it and configure your server.

```
```
[program:php-ntlm-proxy]
command=/usr/bin/php server
directory=/path/to/php-ntlm-proxy
stderr_logfile=/var/log/supervisor/php-ntlm-proxy-stderr.log
stdout_logfile=/var/log/supervisor/php-ntlm-proxy-stdout.log
```
```

[program:php-ntlm-proxy]
command=/usr/bin/php server
directory=/path/to/php-ntlm-proxy
stderr_logfile=/var/log/supervisor/php-ntlm-proxy-stderr.log
stdout_logfile=/var/log/supervisor/php-ntlm-proxy-stdout.log


### Running like a system service

Expand All @@ -54,3 +59,8 @@ https://maslosoft.com/blog/2019/07/10/running-php-script-as-a-system-service-in-
When the server is correctly configured and up and running you can communicate with him throught socket to validate NTLM credentials.

See the php example in `example/auth.php`.


## Contribute

Contact me if you are interested.

0 comments on commit 84eb185

Please sign in to comment.