[질문] PPTPD VPN 설정

이현석의 이미지

PPTPD VPN 서버 설정문제로 삽질을 하다가, 고수님들께 문의를 드립니다.

서버와 클라이언트 접속은 성공했으나, 클라이언트가 인터넷 연결이 되지 않고 있습니다.

pppd / pptpd 설치는 완료되었고, 윈도우 XP에서 연결되었다는 것을 확인하였습니다.

[서버] --> [PC] : Ping 테스트 성공
[서버] <-- [PC] : Ping 테스트 성공

/var/log/message 로그 사항을 봐도 뭔가가 서로 왔다갔다 합니다.
Wireshark 유틸을 이용하면 GRE / PPP 신호가 왔다갔다 합니다.

그런데, 윈도우 PC에서 인터넷만 안되고 있습니다.
뭔가 설정이 부족한 것 같기는 한데, 무엇인지 모르겠네요.

아래 관련 정보들을 살펴봐 주시면 감사하겠습니다. (--)(__) 꾸벅

# cat pptpd.conf
option /etc/ppp/pptpd-options
connections 10
localip 192.168.1.2
remoteip 192.168.1.200-253

# cat pptpd-options
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
#nodefaultroute
lock
nobsdcomp
ms-dns 168.126.63.1
ms-dns 168.126.63.2

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.200   *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
192.168.10.0    *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.10.1    0.0.0.0         UG    0      0        0 eth0

# cat messages
Feb 19 03:59:58 (none) daemon.warn pptpd[560]: MGR: connections limit (10) reached, extra IP addresses ignored
# cat messages
Feb 19 03:59:57 (none) syslog.info syslogd started: BusyBox v1.7.2
Feb 19 03:59:58 (none) daemon.warn pptpd[560]: MGR: connections limit (10) reached, extra IP addresses ignored
Feb 19 03:59:58 (none) daemon.info pptpd[562]: MGR: Manager process started
Feb 19 03:59:58 (none) daemon.info pptpd[562]: MGR: Maximum of 10 connections available
# cat messages
Feb 19 03:59:57 (none) syslog.info syslogd started: BusyBox v1.7.2
Feb 19 03:59:58 (none) daemon.warn pptpd[560]: MGR: connections limit (10) reached, extra IP addresses ignored
Feb 19 03:59:58 (none) daemon.info pptpd[562]: MGR: Manager process started
Feb 19 03:59:58 (none) daemon.info pptpd[562]: MGR: Maximum of 10 connections available
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: MGR: Launching /sbin/pptpctrl to handle client
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: local address = 192.168.1.2
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: remote address = 192.168.1.200
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: pppd options file = /etc/ppp/pptpd-options
Feb 19 04:00:09 (none) daemon.info pptpd[567]: CTRL: Client 192.168.10.9 control connection started
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Received PPTP Control Message (type: 1)
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Made a START CTRL CONN RPLY packet
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: I wrote 156 bytes to the client.
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Sent packet to client
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Received PPTP Control Message (type: 7)
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Set parameters to 100000000 maxbps, 64 window size
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Made a OUT CALL RPLY packet
Feb 19 04:00:09 (none) daemon.info pptpd[567]: CTRL: Starting call (launching pppd, opening GRE)
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: pty_fd = 8
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: tty_fd = 9
Feb 19 04:00:09 (none) daemon.debug pptpd[568]: CTRL (PPPD Launcher): program binary = /sbin/pppd
Feb 19 04:00:09 (none) daemon.debug pptpd[568]: CTRL (PPPD Launcher): local address = 192.168.1.2
Feb 19 04:00:09 (none) daemon.debug pptpd[568]: CTRL (PPPD Launcher): remote address = 192.168.1.200
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: I wrote 32 bytes to the client.
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Sent packet to client
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Received PPTP Control Message (type: 15)
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Got a SET LINK INFO packet with standard ACCMs
Feb 19 04:00:09 (none) daemon.notice pppd[568]: pppd 2.4.3 started by root, uid 0
Feb 19 04:00:09 (none) daemon.info pppd[568]: Using interface ppp0
Feb 19 04:00:09 (none) daemon.notice pppd[568]: Connect: ppp0 <--> /dev/pts/0
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #0
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #1
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #2
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #3
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: CTRL: Received PPTP Control Message (type: 15)
Feb 19 04:00:09 (none) daemon.err pptpd[567]: CTRL: Ignored a SET LINK INFO packet with real ACCMs!
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #4
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #5
Feb 19 04:00:09 (none) daemon.warn pppd[568]: Warning - secret file /etc/ppp/chap-secrets has world and/or group access
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #6
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #7
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #8
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #9
Feb 19 04:00:09 (none) daemon.notice pppd[568]: MPPE 128-bit stateless compression enabled
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #10
Feb 19 04:00:09 (none) daemon.debug pptpd[567]: GRE: accepting packet #11
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #12
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #13
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #14
Feb 19 04:00:11 (none) daemon.info pppd[568]: found interface br0 for proxy arp
Feb 19 04:00:11 (none) daemon.notice pppd[568]: local  IP address 192.168.1.2
Feb 19 04:00:11 (none) daemon.notice pppd[568]: remote IP address 192.168.1.200
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #15
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #16
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #17
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #18
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #19
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #20
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #21
Feb 19 04:00:11 (none) daemon.debug pptpd[567]: GRE: accepting packet #22
Feb 19 04:00:12 (none) daemon.debug pptpd[567]: GRE: accepting packet #23
Feb 19 04:00:12 (none) daemon.debug pptpd[567]: GRE: accepting packet #24
Feb 19 04:00:12 (none) daemon.debug pptpd[567]: GRE: accepting packet #25
Feb 19 04:00:12 (none) daemon.debug pptpd[567]: GRE: accepting packet #26
Feb 19 04:00:12 (none) daemon.debug pptpd[567]: GRE: accepting packet #27
Feb 19 04:00:12 (none) daemon.debug pptpd[567]: GRE: accepting packet #28
Feb 19 04:00:12 (none) daemon.debug pptpd[567]: GRE: accepting packet #29
Feb 19 04:00:12 (none) daemon.debug pptpd[567]: GRE: accepting packet #30
Feb 19 04:00:12 (none) daemon.debug pptpd[567]: GRE: accepting packet #31
Iinux의 이미지

저도 답변 대기중... 

=====================

planetarium의 이미지

방화벽은 꺼보셨겠죠?
전 클라이언트쪽이 리눅스였지만, PPTP VPN이 접속은 되는데 이후 인터넷이 안되서 한참 헤매다 보니
사용하던 방화벽 프로그램(firestarter)이 지원을 안해주는 거였더라구요...

이현석의 이미지

예, 방화벽은 사용을 안하고 있습니다.

biron의 이미지

클라이언트 PC가 XP라면 "원격 네트워크에 기본 게이트웨이 사용"에 체크가 되어있는지 확인해 보심이...
물론 제대로 잘 설정하셨겠지만... 혹시 체크가 되어있다면 체크해제 해보세요...

클라이언트 PC가 리눅스(저는 우분투 10.10)라면, "이 연결의 네트워크에 있는 자원을 위해서만 연결 사용"에 체크가 되어있는지 확인해 보심이...
혹시 체크가 안 되어 있다면 체크 해보세요...

답변이 충분치 않으시다면 아랫분께서 답변해 주시길 바랍니다.

==========

NO means NO

이현석의 이미지

체크를 해제시 인터넷이 됩니다.
해제하면 VPN을 통해서 되는 건지, VPN이 아닌 것으로 되는 건지 잘 모르겠네요.

체크 했을때 인터넷이 되도록 확인을 하고 있습니다.

검객의 이미지

마스커레이드는 해 주셨나요?

echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -j MASQUERADE

우리 항시 웃고 살아요 ^^

이현석의 이미지

현재 iptables 설정이 아래와 같습니다.

그런데, VPN IP를 192.168.1.X 대 사용하고, eth1 역시 192.168.1.X대를 사용하려는 상황입니다.

# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
DNAT       tcp  --  anywhere             anywhere            tcp dpt:9999 to:192.168.1.1:8090
DNAT       tcp  --  anywhere             anywhere            tcp dpt:12345 to:192.168.1.200:12345
DNAT       47   --  anywhere             anywhere            to:192.168.1.1
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4000 to:192.168.1.1:4000
DNAT       udp  --  anywhere             anywhere            udp dpt:4000 to:192.168.1.1:4000
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4001 to:192.168.1.1:4001
DNAT       udp  --  anywhere             anywhere            udp dpt:4001 to:192.168.1.1:4001
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4002 to:192.168.1.1:4002
DNAT       udp  --  anywhere             anywhere            udp dpt:4002 to:192.168.1.1:4002
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4003 to:192.168.1.1:4003
DNAT       udp  --  anywhere             anywhere            udp dpt:4003 to:192.168.1.1:4003
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4004 to:192.168.1.1:4004
DNAT       udp  --  anywhere             anywhere            udp dpt:4004 to:192.168.1.1:4004
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4005 to:192.168.1.1:4005
DNAT       udp  --  anywhere             anywhere            udp dpt:4005 to:192.168.1.1:4005
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4006 to:192.168.1.1:4006
DNAT       udp  --  anywhere             anywhere            udp dpt:4006 to:192.168.1.1:4006
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4007 to:192.168.1.1:4007
DNAT       udp  --  anywhere             anywhere            udp dpt:4007 to:192.168.1.1:4007
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4008 to:192.168.1.1:4008
DNAT       udp  --  anywhere             anywhere            udp dpt:4008 to:192.168.1.1:4008
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4009 to:192.168.1.1:4009
DNAT       udp  --  anywhere             anywhere            udp dpt:4009 to:192.168.1.1:4009
DNAT       tcp  --  anywhere             anywhere            tcp dpt:4010 to:192.168.1.1:4010
DNAT       udp  --  anywhere             anywhere            udp dpt:4010 to:192.168.1.1:4010
DNAT       tcp  --  anywhere             anywhere            tcp dpt:8100 to:192.168.1.1:8100
DNAT       udp  --  anywhere             anywhere            udp dpt:8100 to:192.168.1.1:8100
DNAT       tcp  --  anywhere             anywhere            tcp dpt:telnet to:192.168.1.1:23
DNAT       udp  --  anywhere             anywhere            udp dpt:telnet to:192.168.1.1:23
DNAT       tcp  --  anywhere             anywhere            tcp dpt:1723 to:192.168.1.1:1723
DNAT       udp  --  anywhere             anywhere            udp dpt:1723 to:192.168.1.1:1723
DNAT       tcp  --  anywhere             anywhere            tcp dpt:53 to:192.168.1.1:53
DNAT       udp  --  anywhere             anywhere            udp dpt:53 to:192.168.1.1:53
DNAT       tcp  --  anywhere             anywhere            tcp dpt:80 to:192.168.1.1:80
DNAT       udp  --  anywhere             anywhere            udp dpt:80 to:192.168.1.1:80
DNAT       47   --  anywhere             anywhere            to:192.168.1.1
 
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  192.168.1.0/24       anywhere

# ifconfig
ppp0      Link encap:Point-to-Point Protocol
          inet addr:192.168.1.2  P-t-P:192.168.1.200  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1396  Metric:1
          RX packets:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:4624 (4.5 KiB)  TX bytes:120 (120.0 B)
 
eth1       Link encap:Ethernet  HWaddr 00:90:4C:00:80:14
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:15003 errors:0 dropped:0 overruns:0 frame:0
          TX packets:263 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2558229 (2.4 MiB)  TX bytes:74246 (72.5 KiB)
 
eth0      Link encap:Ethernet  HWaddr 00:90:4C:00:80:14
          inet addr:192.168.10.16  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:9079 errors:0 dropped:0 overruns:0 frame:0
          TX packets:673 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1125987 (1.0 MiB)  TX bytes:40470 (39.5 KiB)
검객의 이미지

iptables에 대해 잘 모르지만 아래 설정 때문에 80포트로 가는 패킷이 192.168.1.1로 갈것 같은데요.
아래 설정을 지워 보시면 얼떨까요??

DNAT tcp -- anywhere anywhere tcp dpt:80 to:192.168.1.1:80

우리 항시 웃고 살아요 ^^

익명 사용자의 이미지

잘 몰라서 헤메고 있네요..^^
감사합니다.

DNAT       tcp  --  anywhere             anywhere            tcp dpt:80 to:192.168.1.1:80
DNAT       udp  --  anywhere             anywhere            udp dpt:80 to:192.168.1.1:80

해당 부분을 삭제해도 연결이 되지 않습니다.

궁금한 것이 있는데,

VPN 구성시에 ppp0에 할당한 IP(192.168.1.200) 설정과 eth1의 네트워크 어드레스(192.168.1.xxx)가 같은데 상관이 없겠지요?
같은 네트워크로 묶어서 사용을 하려고 하는 것인데, 이것도 맞는 것인지 모르겠습니다.

한가지 설정만 추가 하면 바로 될 것 같은데, 그 한가지가 뭔지 모르겠습니다...

이현석의 이미지

감사합니다.

해당 부분을 제거 해도 인터넷이 안되기는 마찬가지 입니다.

VPN 연결의도는 eth1의 네트워크 어드레스를 외부에서도 같이 사용하고자 하는 의도인데, 제가 설정한 값들이 맞는지 모르겠습니다.
eth1의 subnet으로 구성을 해야 하는 것인지, 잘 모르겠네요 ^^;

한가지 설정만 하면 바로 될것 같은데, 그게 무엇인지 잘 몰라 삽질중에 있네요...

검객의 이미지

저는 더 이상 떠오르는 생각이 없네요. 거의 다 된것 같은데 안타깝네요.
다른 분들이 도움을 주길 바랍니다.
꼭 성공하세요.

우리 항시 웃고 살아요 ^^

이현석의 이미지

많은 관심 가져주셔서 감사합니다.

planetarium의 이미지

인용 :
VPN IP를 192.168.1.X 대 사용하고, eth1 역시 192.168.1.X대를 사용하려는 상황입니다.

이 부분이 문제 아닐까요?
서로 다른 네트웍을 사용해야 하는거 아닌지...

익명 사용자의 이미지

iptables 에서 ip masquerade 를 하면 안되나요?

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.