PPTPD centos7 install problem fix

9165 단어
인터넷 강좌에 따르면 centos7에 PPTP VPN 서버를 설치한 후 IOS가 계속 오류를 보고하여 연결할 수 없습니다.VAR LOG MESSAGES를 보면 다음과 같은 오류가 발생합니다. Aug 4 16:05:04 oltsvr pptpd[15707]: CTRL: Client 112.17.247.42 control connection started Aug 4 16:05:04 oltsvr pptpd[15707]: CTRL: Starting call(launching pppd, opening GRE) Aug 4 16:05:05 oltsvr kernel: conntrack: generic helper won't handle protocol 47.Please consider loading the specific helper module. Aug 4 16:05:05 oltsvr pppd[15708]:/usr/lib/pptpd/pptpd-logwtmp.so: wrong ELF class: ELFCLASS32 Aug 4 16:05:05 oltsvr pppd[15708]: Couldn’t load plugin/usr/lib/pptpd/pptpd-logwtmp.so Aug 4 16:05:05 oltsvr pptpd[15707]: GRE: read(fd=6,buffer=8059680,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 4 16:05:05 oltsvr pptpd[15707]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7) Aug 4 16:05:05 oltsvr pptpd[15707]: CTRL: Client 112.17.247.42 control connection finished
나중에/etc/pptpd를 수정했습니다.conf는 logwtmp라는 줄을 지우면 OK입니다.
성공 로그는 다음과 같습니다.
Aug 5 10:05:44 oltsvr pptpd[42095]: CTRL: Client 112.17.247.42 control connection started Aug 5 10:05:44 oltsvr pptpd[42095]: CTRL: Starting call (launching pppd, opening GRE) Aug 5 10:05:44 oltsvr kernel: PPP generic driver version 2.4.2 Aug 5 10:05:44 oltsvr pppd[42096]: pppd 2.4.5 started by root, uid 0 Aug 5 10:05:44 oltsvr pppd[42096]: Using interface ppp0 Aug 5 10:05:44 oltsvr pppd[42096]: Connect: ppp0 /dev/pts/4 Aug 5 10:05:44 oltsvr NetworkManager[1274]: (ppp0): new Generic device (carrier: UNKNOWN, driver: ‘unknown’, ifindex: 8)
Aug 5 10:05:47 oltsvr kernel: PPP MPPE Compression module registered Aug 5 10:05:47 oltsvr pppd[42096]: MPPE 128-bit stateless compression enabled Aug 5 10:05:47 oltsvr pppd[42096]: Cannot determine ethernet address for proxy ARP Aug 5 10:05:47 oltsvr pppd[42096]: local IP address 10.12.2.100 Aug 5 10:05:47 oltsvr pppd[42096]: remote IP address 10.12.2.101 Aug 5 10:05:47 oltsvr NetworkManager[1274]: keyfile: add connection in-memory (5fa4eb7b-1f2f-4ea4-9374-024a1561e71f,”ppp0”) Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): device state change: unmanaged -> unavailable (reason ‘connection-assumed’) [10 20 41] Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): device state change: unavailable -> disconnected (reason ‘connection-assumed’) [20 30 41] Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): Activation: starting connection ‘ppp0’ (5fa4eb7b-1f2f-4ea4-9374-024a1561e71f) Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): device state change: disconnected -> prepare (reason ‘none’) [30 40 0] Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): device state change: prepare -> config (reason ‘none’) [40 50 0] Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): device state change: config -> ip-config (reason ‘none’) [50 70 0] Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): device state change: ip-config -> ip-check (reason ‘none’) [70 80 0] Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): device state change: ip-check -> secondaries (reason ‘none’) [80 90 0] Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): device state change: secondaries -> activated (reason ‘none’) [90 100 0] Aug 5 10:05:47 oltsvr NetworkManager[1274]: (ppp0): Activation: successful, device activated. Aug 5 10:05:47 oltsvr dbus-daemon: dbus[1199]: [system] Activating via systemd: service name=’org.freedesktop.nm_dispatcher’ unit=’dbus-org.freedesktop.nm-dispatcher.service’ Aug 5 10:05:47 oltsvr dbus[1199]: [system] Activating via systemd: service name=’org.freedesktop.nm_dispatcher’ unit=’dbus-org.freedesktop.nm-dispatcher.service’
Aug 5 10:05:47 oltsvr systemd: Starting Network Manager Script Dispatcher Service… Aug 5 10:05:47 oltsvr dbus[1199]: [system] Successfully activated service ‘org.freedesktop.nm_dispatcher’ Aug 5 10:05:47 oltsvr systemd: Started Network Manager Script Dispatcher Service. Aug 5 10:05:47 oltsvr dbus-daemon: dbus[1199]: [system] Successfully activated service ‘org.freedesktop.nm_dispatcher’ Aug 5 10:05:47 oltsvr nm-dispatcher: Dispatching action ‘up’ for ppp0 Aug 5 10:05:47 oltsvr systemd: Unit iscsi.service cannot be reloaded because it is inactive. Aug 5 10:05:47 oltsvr systemd: Stopping Sendmail Mail Transport Client… Aug 5 10:05:47 oltsvr systemd: Stopping Sendmail Mail Transport Agent… Aug 5 10:05:47 oltsvr systemd: Starting Sendmail Mail Transport Agent…
여기서 몇 가지를 요약합니다. 1. 코어는 다시 컴파일할 필요가 없습니다. 로그에 보고된 연결 추적 GRE 문제는 무시할 수 있습니다. PPTPD ALG를 할 때만 코어를 다시 컴파일해야 합니다.2, PPTPD의 시작은 SYSTEMCTL RESTART PPTPD를 통해 이루어집니다.Service 재부팅 또는 중지3. FIREWALL-CMD를 통해 방화벽을 설치하고 RELOAD를 주의하십시오.
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -i eth0 -p tcp --dport 1723 -j ACCEPT
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p gre -j ACCEPT
firewall-cmd --permanent --direct --add-rule ipv4 filter POSTROUTING 0 -t nat -o enp7s0f2 -j MASQUERADE  
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i ppp+ -o eth0 -j ACCEPT  
firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i enp7s0f2 -o ppp+ -j ACCEPT


FAQ:1, IOS 콜아웃 시 logwtmp와 PPP가 충돌하여 통신이 중단됨을 알립니다.
2. 번호를 뽑아 성공했지만 경로가 통하지 않아 PPTPD라는 CENTOS 서버에만 도달할 수 있고 다른 곳에서는 TCPDUMP - I PPP0 패키지에 도달할 수 없습니다. 첫 번째 SYN 연결은 ICMP에 도달할 수 없습니다.방화벽이 막혔기 때문에 - o eth0 배열이 잘못되었습니다. 제 enp7s0f1 인터페이스 이름: firewall-cmd–permanent–direct–add-rule ipv4 filter FORWARD 0-i ppp+-o enp7s0f1-j ACCEPT
3. 네트에 도달할 수 있지만 인터넷망은 또 통하지 않는다.아니면 방화벽이 막았는지, 인터페이스 허가 규칙을 하나 더 추가했다.외부 네트워크 인터페이스 ENP7S0F2에서만 나갈 수 있습니다.firewall-cmd –permanent –direct –add-rule ipv4 filter FORWARD 0 -i ppp+ -o enp7s0f2 -j ACCEPT
참고: 내 라우팅 테이블:
[root@oltsvr ~]#  ip r
default via 218.75.33.25 dev enp7s0f2 
10.7.0.0/16 via 10.7.100.1 dev enp7s0f1 
10.7.100.0/24 dev enp7s0f1  proto kernel  scope link  src 10.7.100.234  metric 100 
10.11.0.0/16 via 10.7.100.1 dev enp7s0f1 
10.12.0.0/16 via 10.7.100.1 dev enp7s0f1 
10.13.0.0/16 via 10.7.100.1 dev enp7s0f1 
10.14.0.0/16 via 10.7.100.1 dev enp7s0f1 
192.168.100.1 dev ppp0  proto kernel  scope link  src 192.168.10.1 
192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1 
218.75.33.24/29 dev enp7s0f2  proto kernel  scope link  src 218.75.33.29 

좋은 웹페이지 즐겨찾기