Koozali.org: home of the SME Server

vpn pptp verso sme server olny

Offline Milano1971

  • ****
  • 252
  • +0/-0
vpn pptp verso sme server olny
« on: June 26, 2019, 09:06:54 PM »
Avrei la necessità di accedere al alcune risorse presenti nella rete da alcuni pc remoti. Per farlo ho seguito questa strada:
Port forwarding della porta tcp1723 verso l'ip sel server sme (modalità server only).
Dal server manager settato a 4 sessioni di accesso pptp contemporanee.
Creato un utente ad hoc con accesso alle ibay che mi interessano.
Non so se ho seguito la strada più giusta, ma fatto ciò dai 4 pc presenti in una sede remota, instaurando una connessione vpn verso l'ip della rete dove è presente sme riesco ad accedere alle risorse e tutto funziona perfettamente.
Quello che mi interessa è il discorso sicurezza in quanto, nel momento in cui sono connessi tutti e 4 i pc, il server sme giustamente non accetta altre connessioni vpn (limite settato a 4 dal server manager).
Ma quando i client non sono connessi gli stessi utenti potrebbero connettersi da altri luoghi oppure estranei potrebbero addirittura riuscire ad intercettare la password della vpn pptp (purtroppo non posso usare openvpn perchè non posso installare software sui pc remoti ed utilizzo la vpn integrata in windows).
Mi chiedevo quale strada poter seguire per garantirmi maggior sicurezza.
Avrei anche pensato di consentire le connessioni pptp in ingresso su sme da un singolo indirizzo ip (quello della sede remota dove sono presenti i 4 pc). Questo garantirebbe già un'ottima sicurezza, ma non sono riuscito a trovare l'impostazione dal server-manager.
Suggerimenti e idee sono ben accetti
« Last Edit: June 28, 2019, 01:15:49 AM by Milano1971 »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: vpn pptp verso sme server olny
« Reply #1 on: June 27, 2019, 02:36:43 AM »
1. Non usare PPTP: è terribile.
https://www.schneier.com/academic/pptp/faq.html

2. Se usi PPTP
https://wiki.contribs.org/VPN_practical_tips#Mapping_Ip_addresses

Questo è usato qui:
etc / raddb / users / 20vpnusers: 22: my $ pptpip = $ account-> prop ('PPTPIP');

Avrai sempre un problema con i limiti numerici. Non c'è cura. Una migliore sicurezza è l'unica vera risposta.

Ho creato un contrib L2tpd / Ipsec. L2tpd / Ipsec è integrato in Windows. È possibile abilitare / disabilitare gli utenti dal server-manager. PERÒ. Penso che mi aspettassi solo che contrib contribuisca a lavorare su server-gateway

È complicato da Ipsec ma potrebbe funzionare con alcune modifiche al codice.

E 'possibile che sia possibile eseguire una connessione Ipsec v2 pura ma non l'ho provato.


------------------

1. Don't use PPTP - it is terrible.
https://www.schneier.com/academic/pptp/faq.html

2. If you do use PPTP
https://wiki.contribs.org/VPN_practical_tips#Mapping_Ip_addresses

This is used here:
etc/raddb/users/20vpnusers:22:   my $pptpip = $account->prop('PPTPIP');

You will always have a problem with number limits. There is no cure. Better security is the only real answer.

I have built a L2tpd/Ipsec contrib. L2tpd/Ipsec is built in to windows. You can enable/disable users from the server-manager. HOWEVER. I think I only expected the contrib to work in server-gateway

It is complicated by Ipsec but it may work with some code modifications.

It 'may' be possible to do a pure Ipsec v2 connection but I have not tried this.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: vpn pptp verso sme server olny
« Reply #2 on: June 27, 2019, 02:56:01 AM »
PPTP è deprecata. Qualcuno direbbe che è MALE. ^_^

Potresti vedere se puoi far instaurare la VPN al router della sede remota.
L'idea di bloccare "per IP" l'accesso dall'esterno potrebbe essere buona; puoi impostare il port forwading (sul tuo router) per accettare connessioni su quella porta solo da quell'IP/HOST?

Offline Milano1971

  • ****
  • 252
  • +0/-0
Re: vpn pptp verso sme server olny
« Reply #3 on: June 27, 2019, 05:22:33 PM »
La rete remota purtroppo non è gestita da me e non ho accesso come amministratore ai client figuriamoci al router. In ogni caso solo 4 di 20 client devono connettersi alla vpn e anche saltuariamente, quindi non avrei avuto comunque convenienza nel configurarla sul router della sede remota.
Il router utilizzato nella rete dov'è presente sme non mi permette di impostare il sourge ip nel port forwarding, quindi o invia tutte le richieste provenienti sulla porta tcp1723 all'ip interno indicato o niente.
Proprio quest'ultima operazione pensavo fosse possibile farla su sme. Infatti lasciando il port forwarding attivo sul router ed impostando a 0 il numero di connessioni massime pptp nel server-manager sono comunque protetto senza problemi, quindi se potessi impostare una lista di indirizzi ip da cui accettare le connessioni vpn starei abbastanza tranquillo.
Questa operazione l'ho fatta per l'accesso al server-manager, al quale accedo da remoto solo da alcuni indirizzi ip inseriti nella lista.
« Last Edit: June 28, 2019, 01:19:31 AM by Milano1971 »

Offline Milano1971

  • ****
  • 252
  • +0/-0
Re: vpn pptp verso sme server olny
« Reply #4 on: June 29, 2019, 05:05:29 PM »

2. Se usi PPTP
https://wiki.contribs.org/VPN_practical_tips#Mapping_Ip_addresses


Non ho capito se e come questa parte potrebbe fare al caso mio:

Mapping Ip addresses
to map a user to a fixed ip address do
db accounts setprop username PPTPIP xxx.xxx.xxx.xxx
signal-event remoteaccess-update
where xxx.xxx.xxx.xxx is a local ip

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: vpn pptp verso sme server olny
« Reply #5 on: July 01, 2019, 05:48:07 PM »
Se ti colleghi in PPTP il server ti assegnerà un indirizzo IP, tramite "setprop" assegni un IP fisso a ogni client, basato sul nome con cui si collega. Ovviamente un user = un collegamento PPTP.

Offline Milano1971

  • ****
  • 252
  • +0/-0
Re: vpn pptp verso sme server olny
« Reply #6 on: July 03, 2019, 05:49:58 PM »
Se ti colleghi in PPTP il server ti assegnerà un indirizzo IP, tramite "setprop" assegni un IP fisso a ogni client, basato sul nome con cui si collega. Ovviamente un user = un collegamento PPTP.

Quindi setprop non è la soluzione al mio problema :-(

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: vpn pptp verso sme server olny
« Reply #7 on: July 03, 2019, 07:09:08 PM »
Ahhh - I * penso * che questo ti assegni un IP "INTERNO" fisso dal pool sulle PMI. Non blocca l'indirizzo IP in entrata.

Penso che le tue migliori opzioni siano smettere di usare PPTP, o almeno limitare l'accesso usando il firewall sul tuo server o sul tuo router.

Abbastanza onestamente, PPTP è così insicuro che si può anche non preoccuparsi di qualsiasi altra sicurezza ..........

Se sei preoccupato per la sicurezza, usa un sistema diverso. Questo è l'unico consiglio "buono" che posso darti.

Nota SME v10 NON ha PPTP quindi potresti iniziare a utilizzare altri sistemi ora.


-----------------------------

Ahhh - I *think* that this assigns you a fixed "INTERNAL" IP from the pool on SME. It does not lock the incoming IP address.

I think your best options are to stop using PPTP,  or at least restrict access using the firewall on your server or your router.

Quite honestly, PPTP is so insecure you may as well not bother with any other security..........

If you are concerned about security, use a different system. That is the only 'good' advice I can give you.

Note SME v10 will NOT have PPTP so you may as well start using other systems now.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: vpn pptp verso sme server olny
« Reply #8 on: July 04, 2019, 02:18:47 AM »
Un pfsense virtualizzato da usare come server OpenVPN potrebbe essere una buona soluzione.

Offline Milano1971

  • ****
  • 252
  • +0/-0
Re: vpn pptp verso sme server olny
« Reply #9 on: July 04, 2019, 04:03:18 PM »
Penso che le tue migliori opzioni siano smettere di usare PPTP, o almeno limitare l'accesso usando il firewall sul tuo server o sul tuo router.
L'obiettivo era proprio quello di impostare il server sme per accettare l'accesso pptp solo da un indirizzo ip oppure anche solo dagli indirizzi ip inseriti tra le "reti locali" del server-manager ;-)

Offline Milano1971

  • ****
  • 252
  • +0/-0
Re: vpn pptp verso sme server olny
« Reply #10 on: July 04, 2019, 04:03:51 PM »
L'obiettivo era proprio quello di impostare il server sme per accettare l'accesso pptp solo da un indirizzo ip oppure anche solo dagli indirizzi ip inseriti tra le "reti locali" del server-manager ;-)

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: vpn pptp verso sme server olny
« Reply #11 on: July 04, 2019, 04:13:01 PM »
In modalità server-only, non dovendo agire da router, penso siano disattivate tutte le funzioni di firewalling e quindi la vedo dura farlo da SME. Le porte vengono girate dal tuo router; o filta lui oppure, come già consigliato, cambi sistema, anche per sicurezza.

... comunque ho vaghi ricordi di un "config setprop _xyz_ AllowHost/DenyHost _value_"...

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: vpn pptp verso sme server olny
« Reply #12 on: July 04, 2019, 04:14:56 PM »
Un pfsense virtualizzato da usare come server OpenVPN potrebbe essere una buona soluzione.

Non può modificare i client remoti. Quindi non può aggiungere il client openvpn.
Potrebbe usare L2tpd / IPSEC che è anche vecchio e non eccezionale ma migliore, è integrato nella maggior parte dei client.
Potrebbe anche usare IPSEC2, che è anche integrato in molti client ora.

-------------------------

He cannot modify the remote clients. So he cannot add the openvpn client.
He could use L2tpd/IPSEC which is also old and not great but better, is built in to most clients.
He could also use IPSEC2 which is also built in to many clients now.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: vpn pptp verso sme server olny
« Reply #13 on: July 04, 2019, 04:16:16 PM »
Firewall.

Non fa alcuna differenza.

È possibile leggere facilmente qualsiasi traffico OVUNQUE fuori dalla rete.

PPTP è totalmente insicuro

---------------------

It doesn't make any difference.

Any traffic ANYWHERE outside your network can easily be read.

PPTP is totally insecure
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Milano1971

  • ****
  • 252
  • +0/-0
Re: vpn pptp verso sme server olny
« Reply #14 on: July 05, 2019, 04:32:24 PM »
In modalità server-only, non dovendo agire da router, penso siano disattivate tutte le funzioni di firewalling e quindi la vedo dura farlo da SME. Le porte vengono girate dal tuo router; o filta lui oppure, come già consigliato, cambi sistema, anche per sicurezza.

Il router purtroppo gira la porta tcp1723 da qualsiasi ip esterno all'ip interno di sme SEMPRE
Il server sme è impostato per accettare n.0 connessioni pptp
In questo scenario, pur avendo la porta inoltrata, sono completamente al sicuro

Il problema nasce in alcuni periodi dell'anno in cui da una sede remota ho bisogno di instaurare n.4 connessioni pptp al server intermittenti e quindi sme resta impostato per accettare n.4 connessioni pptp

Cerco il modo per istruire sme ad accettare le 4 connessioni pptp solo se provenienti da un singolo indirizzo ip
« Last Edit: July 05, 2019, 04:35:18 PM by Milano1971 »