실은 odroid에 한거임 ㅋㅋㅋ

$ sudo apt-get install openvpn 

인 줄 알았는데 굳이 이거 아니어도 되는건가?


아래는 좀 다시 내용을 봐야 할 듯..

$ sudo apt-get install pptp-linux 

[링크 : https://prosindo.com/blog/2015/08/24/vpn-pptp-client-on-raspberry-pi/]

+

2018.05.14

라즈베리에서 설치해보니 위에 패키지를 깔면 된다.

$ sudo apt-get install pptp-linux

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

  ppp

The following NEW packages will be installed:

  ppp pptp-linux

0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.

Need to get 358 kB of archives.

After this operation, 859 kB of additional disk space will be used.

Do you want to continue? [Y/n]

+


$ sudo pptpsetup --create MYCONNECTION --server vpn.ourcompany.com --domain DOMAINNAME --username myname --password ******* --encrypt --start 

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=123022]


+

주소와 계정은 임의로 변조함

$ sudo pptpsetup --create TUNN --server vpntest.minimonk.net --username pi --password raspberrypi --encrypt --start

Using interface ppp0

Connect: ppp0 <--> /dev/pts/9

CHAP authentication succeeded

MPPE 128-bit stateless compression enabled

local  IP address 192.168.219.205

remote IP address 192.168.219.1 


원격으로 접속해서 크롬으로 접속하다 보니 영어로 나옴.. -_-a

아무튼 VPN 상태에서 Connected로 뜸!!


전혀 다른 아이피와 전혀 다른 NIC으로 접속이 됨

$ ifconfig

eth0      Link encap:Ethernet  HWaddr 3a:02:dd:--:--:--

          inet addr:192.168.10.83  Bcast:192.168.10.255  Mask:255.255.255.0

          inet6 addr: fe80::3802:ddff:fe--:----/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:27646 errors:0 dropped:0 overruns:0 frame:0

          TX packets:12819 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:35345850 (35.3 MB)  TX bytes:1348771 (1.3 MB)


lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:65536  Metric:1

          RX packets:228 errors:0 dropped:0 overruns:0 frame:0

          TX packets:228 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:23139 (23.1 KB)  TX bytes:23139 (23.1 KB)


ppp0      Link encap:Point-to-Point Protocol

          inet addr:192.168.219.205  P-t-P:192.168.219.1  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1496  Metric:1

          RX packets:7 errors:0 dropped:0 overruns:0 frame:0

          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3

          RX bytes:70 (70.0 B)  TX bytes:76 (76.0 B) 


$ ping 192.168.219.1

PING 192.168.219.1 (192.168.219.1) 56(84) bytes of data.

64 bytes from 192.168.219.1: icmp_seq=1 ttl=64 time=6.53 ms

64 bytes from 192.168.219.1: icmp_seq=2 ttl=64 time=7.12 ms

64 bytes from 192.168.219.1: icmp_seq=3 ttl=64 time=6.41 ms

^C

--- 192.168.219.1 ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2002ms

rtt min/avg/max/mdev = 6.417/6.693/7.129/0.325 ms 


$ ping 192.168.10.1

PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.

64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=0.774 ms

64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=0.892 ms

^C

--- 192.168.10.1 ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 999ms

rtt min/avg/max/mdev = 0.774/0.833/0.892/0.059 ms


그런데.. 80번 포트 포워딩 해서 접속해보려고 하는데 이건 안되네..


+

$ pptpsetup --help

pptpsetup --create <TUNNEL> --server <SERVER> [--domain <DOMAIN>]

          --username <USERNAME> [--password <PASSWORD>]

          [--encrypt] [--start]


pptpsetup --delete <TUNNEL>


Options:


* the name you wish to use to refer to the tunnel (you choose it),

* the IP address or host name of the server,

* the authentication domain name (optional),

* the username you are to use,

* the password you are to use,

* whether encryption is required,

* whether to start the connection after configuration.


pptpsetup - Point-to-Point Tunneling Protocol setup


Copyright (C) 2006 Nelson Ferraz


pptpsetup comes with ABSOLUTELY NO WARRANTY; for details see source.

This is free software, and you are welcome to redistribute it

under certain conditions; see source for details. 


+

2018.05.14

터널 설정은 위에서 한 대로 pptpsetup을 이용하면되고

접속은

$ sudo pon TUNN 


+

접속 끊기는

$ sudo poff TUNN

[링크 : https://wiki.archlinux.org/index.php/PPTP_Client]


이상하게 접속이 안되는 경우가 있는데, 일단은 SD 메모리 불량으로 EXT 파일 경고가 뜨는거 봐서는

시스템이 엉겨서 그런 듯..

$ sudo pptpsetup --create TUNN ...

Using interface ppp0

Connect: ppp0 <--> /dev/pts/9

Modem hangup

Connection terminated. 


Ubuntu 14.04 에서는 커널 모듈 문제로 발생하는 경우도 있는 듯

[링크 : https://askubuntu.com/questions/269399/failed-to-connect-to-pptp-vpn-server-on-ubuntu]


+

접속 로그 보는 방법

# pon <TUNNEL> debug dump logfd 2 nodetach 

[링크 : https://wiki.archlinux.org/index.php/PPTP_Client]


해보니까.. debug랑 nodetach만 해도 된다.

'프로그램 사용 > VPN(PPTP)' 카테고리의 다른 글

VPN / 웹서버 설정  (0) 2018.05.14
iptime vpn 제약?  (0) 2018.05.12
Posted by 구차니