PPTP 서버 만들기

8338 단어 UbuntuPPTP
중국에 있는 동안 컴퓨터와 스마트폰을 다시 설정해야 했다.
Google Chrome, Google Play 다운로드는 VPN을 통해 진행됩니다.
VPN 서비스는 어디가 좋습니까?기술자라면 자체적으로 VPN 서버를 구축하세요.
패키지를 다운로드하기 위한 용도이기 때문에 PPTP 서버를 빠르게 만들 수 있습니다.

환경


Amazon AWS 미국 동부(버지니아 북부, US-EAST-1) 지역
t2.small 실례.이전 Ubuntu-14.04
원래는 다른 일을 하는 데 쓰였다.

Ubuntu18.04부터 연결


AWS의 보안 그룹 설정은 다음과 같습니다.
원래 80, 110, 22, 21, 25, 587 포트를 사용하는 서버였기 때문에 이를 바탕으로 1723과 GRE를 추가했다.

이 기초 위에서
https://qiita.com/Amothic/items/b253bbea78e669a14bac
의 설정입니다.
못 받아.
/var/log/syslog를 표시합니다.
https://qiita.com/tukiyo3/items/a3088de30d2faa8c1e93
에서 기술한 장면은 다음과 같은 절차를 이용하여 명세표를 작성하여 개념 디자인에서 체량의 부피를 분석하도록 한다.

Aug 30 10:08:16 www pptpd[20754]: CTRL: Client 113.88.44.84 control connection started
Aug 30 10:08:17 www pptpd[20754]: CTRL: Starting call (launching pppd, opening GRE)
Aug 30 10:08:17 www pppd[20755]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
Aug 30 10:08:17 www pppd[20755]: The remote system is required to authenticate itself
Aug 30 10:08:17 www pppd[20755]: but I couldn't find any suitable secret (password) for it to use to do so.
Aug 30 10:08:17 www pptpd[20754]: GRE: read(fd=6,buffer=7f81216934a0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Aug 30 10:08:17 www pptpd[20754]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
Aug 30 10:08:17 www pptpd[20754]: CTRL: Reaping child PPP[20755]
Aug 30 10:08:17 www pptpd[20754]: CTRL: Client 113.88.44.84 control connection finished
원인,/etc/ppp/chap의
격식을 틀려서 엉망진창으로 썼다.수정하면

Aug 30 10:48:49 www pptpd[21271]: CTRL: Client 113.88.44.84 control connection started
Aug 30 10:48:50 www pptpd[21271]: CTRL: Starting call (launching pppd, opening GRE)
Aug 30 10:48:50 www pppd[21272]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
Aug 30 10:48:50 www pppd[21272]: pppd 2.4.5 started by ubuntu, uid 0
Aug 30 10:48:50 www pppd[21272]: Using interface ppp0
Aug 30 10:48:50 www pppd[21272]: Connect: ppp0 <--> /dev/pts/6
Aug 30 10:48:51 www pppd[21272]: peer from calling number 113.88.44.84 authorized
Aug 30 10:48:51 www pppd[21272]: MPPE required but peer negotiation failed
Aug 30 10:48:52 www pppd[21272]: Connection terminated.
Aug 30 10:48:52 www pppd[21272]: Connect time 0.1 minutes.
Aug 30 10:48:52 www pppd[21272]: Sent 10 bytes, received 15 bytes.
Aug 30 10:48:52 www pppd[21272]: Exit.
Aug 30 10:48:52 www pptpd[21271]: GRE: read(fd=6,buffer=7ff9a495c4a0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Aug 30 10:48:52 www pptpd[21271]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
Aug 30 10:48:52 www pptpd[21271]: CTRL: Reaping child PPP[21272]
Aug 30 10:48:52 www pptpd[21271]: CTRL: Client 113.88.44.84 control connection finished
응?
여기 참고
http://ussr.kiev.ua/ru/VPN-PPTP
SCHAP을 시도해 보십시오.
/etc/ppp/pptpd-options
수정은 다음과 같습니다.

# BSD licensed ppp-2.4.2 upstream with MPPE only, kernel module ppp_mppe.o
# {{{
refuse-pap
refuse-chap
refuse-mschap
# Require the peer to authenticate itself using MS-CHAPv2 [Microsoft
# Challenge Handshake Authentication Protocol, Version 2] authentication.
require-mschap-v2
# Require MPPE 128-bit encryption
# (note that MPPE requires the use of MSCHAP-V2 during authentication)
require-mppe-128

refuse-pap
refuse-chap
require-mschap
# Require the peer to authenticate itself using MS-CHAPv2 [Microsoft
# Challenge Handshake Authentication Protocol, Version 2] authentication.
#require-mschap-v2
# Require MPPE 128-bit encryption
# (note that MPPE requires the use of MSCHAP-V2 during authentication)
#require-mppe-128
연결은 다음과 같습니다.

Aug 30 11:14:17 www pptpd[21547]: CTRL: Client 113.88.44.84 control connection started
Aug 30 11:14:18 www pptpd[21547]: CTRL: Starting call (launching pppd, opening GRE)
Aug 30 11:14:18 www pppd[21548]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
Aug 30 11:14:18 www pppd[21548]: pppd 2.4.5 started by ubuntu, uid 0
Aug 30 11:14:18 www pppd[21548]: Using interface ppp0
Aug 30 11:14:18 www pppd[21548]: Connect: ppp0 <--> /dev/pts/6
Aug 30 11:14:19 www pppd[21548]: peer from calling number 113.88.44.84 authorized
Aug 30 11:14:19 www pppd[21548]: MPPE required but peer negotiation failed
Aug 30 11:14:19 www pppd[21548]: Connection terminated.
Aug 30 11:14:19 www pppd[21548]: Connect time 0.1 minutes.
Aug 30 11:14:19 www pppd[21548]: Sent 10 bytes, received 15 bytes.
Aug 30 11:14:19 www pppd[21548]: Exit.
Aug 30 11:14:19 www pptpd[21547]: GRE: read(fd=6,buffer=7fe7d59064a0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Aug 30 11:14:19 www pptpd[21547]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
Aug 30 11:14:19 www pptpd[21547]: CTRL: Reaping child PPP[21548]
Aug 30 11:14:19 www pptpd[21547]: CTRL: Client 113.88.44.84 control connection finished

Android에서 연결하기


모델: HUAWAY P20Lite Android 버전 8.0.0
그럼 안드로이드에서 연결하려면

Aug 30 11:35:12 www pptpd[21695]: CTRL: Client 112.97.36.78 control connection started
Aug 30 11:35:12 www pptpd[21695]: CTRL: EOF or bad error reading ctrl packet length.
Aug 30 11:35:12 www pptpd[21695]: CTRL: couldn't read packet header (exit)
Aug 30 11:35:12 www pptpd[21695]: CTRL: CTRL read failed
Aug 30 11:35:12 www pptpd[21695]: CTRL: Reaping child PPP[0]
Aug 30 11:35:12 www pptpd[21695]: CTRL: Client 112.97.36.78 control connection finished
연결할 수 없습니다.
TU 질문인가요?
리본에서 를 클릭합니다.
댓글 달았어요. mtu1492.

Aug 30 11:48:18 www pptpd[21892]: CTRL: Client 112.97.36.78 control connection started
Aug 30 11:48:18 www pptpd[21892]: CTRL: Starting call (launching pppd, opening GRE)
Aug 30 11:48:18 www pppd[21893]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
Aug 30 11:48:18 www pppd[21893]: pppd 2.4.5 started by ubuntu, uid 0
Aug 30 11:48:18 www pppd[21893]: Using interface ppp1
Aug 30 11:48:18 www pppd[21893]: Connect: ppp1 <--> /dev/pts/7
Aug 30 11:48:22 www pppd[21893]: peer from calling number 112.97.36.78 authorized
Aug 30 11:48:22 www pppd[21893]: LCP terminated by peer (MPPE required but peer negotiation failed)
Aug 30 11:48:22 www pptpd[21892]: CTRL: EOF or bad error reading ctrl packet length.
Aug 30 11:48:22 www pptpd[21892]: CTRL: couldn't read packet header (exit)
Aug 30 11:48:22 www pptpd[21892]: CTRL: CTRL read failed
Aug 30 11:48:22 www pppd[21893]: Hangup (SIGHUP)
Aug 30 11:48:22 www pppd[21893]: Modem hangup
Aug 30 11:48:22 www pppd[21893]: Connection terminated.
Aug 30 11:48:22 www pppd[21893]: Connect time 0.1 minutes.
Aug 30 11:48:22 www pppd[21893]: Sent 32 bytes, received 10 bytes.
Aug 30 11:48:22 www pptpd[21892]: CTRL: Reaping child PPP[21893]
Aug 30 11:48:22 www pppd[21893]: Exit.
Aug 30 11:48:22 www pptpd[21892]: CTRL: Client 112.97.36.78 control connection finished
그거?
또한 mschapv2를 유효하게 하면 이렇게 됩니다(Android P20Lite 측면에서는 MPPE가 유효하든 무효하든 변화가 없습니다)

Aug 30 12:12:53 www pptpd[22138]: CTRL: Client 112.97.36.89 control connection started
Aug 30 12:12:53 www pptpd[22138]: CTRL: EOF or bad error reading ctrl packet length.
Aug 30 12:12:53 www pptpd[22138]: CTRL: couldn't read packet header (exit)
Aug 30 12:12:53 www pptpd[22138]: CTRL: CTRL read failed
Aug 30 12:12:53 www pptpd[22138]: CTRL: Reaping child PPP[0]
Aug 30 12:12:53 www pptpd[22138]: CTRL: Client 112.97.36.89 control connection finished
이번에는 안드로이드에 대해 한꺼번에 할 수 없어서 일본으로 돌아가서 설정을 포기했다.

좋은 웹페이지 즐겨찾기