«   2021/03   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
03-09 10:52
Notice
Today
83
Total
1,408,514
관리 메뉴

변군이글루

[VPN] Linux에서 SoftEther VPN 클라이언트 설치-2 본문

* 리눅스

[VPN] Linux에서 SoftEther VPN 클라이언트 설치-2

변군 변군이글루 2020. 12. 30. 09:56

Linux에서 SoftEther VPN 클라이언트 설치

라이브러리 설치

yum install -y gcc zlib-devel openssl-devel readline-devel ncurses-devel

SoftEther VPN Client 설치

https://sangchul.kr/874

SoftEther VPN Client 아이피 할당(매뉴얼)

dhclient 프로세스 제거

$killadd dhclient

아이피 할당

ifconfig vpn_tun0 192.168.160.241/24

라우팅 테이블 추가

route add -host 222.222.111.111 gw 192.168.160.1
route add -host 222.222.112.111 gw 192.168.160.1

계정 상태 확인

vpncmd /client localhost

AccountStatusGet DVPN

$ /usr/local/src/vpnclient/vpncmd /client localhost
vpncmd command - SoftEther VPN Command Line Management Utility
SoftEther VPN Command Line Management Utility (vpncmd command)
Version 4.34 Build 9745   (English)
Compiled 2020/04/05 23:39:56 by buildsan at crosswin
Copyright (c) SoftEther VPN Project. All Rights Reserved.

Connected to VPN Client "localhost".

VPN Client>AccountStatusGet DVPN
AccountStatusGet command - Get Current VPN Connection Setting Status
Item                                      |Value
------------------------------------------+--------------------------------------------------------
VPN Connection Setting Name               |DVPN
Session Status                            |Connection Completed (Session Established)
VLAN ID                                   |-
Server Name                               |111.111.111.111
Port Number                               |TCP Port 443
Server Product Name                       |SoftEther VPN Server (64 bit)
Server Version                            |4.34
Server Build                              |Build 9745
Connection Started at                     |2020-12-30 (Wed) 09:17:57
First Session has been Established since  |2020-12-30 (Wed) 09:17:57
Current Session has been Established since|2020-12-30 (Wed) 09:17:57
Number of Established Sessions            |1 Times
Half Duplex TCP Connection Mode           |No (Full Duplex Mode)
VoIP / QoS Function                       |Enabled
Number of TCP Connections                 |2
Maximum Number of TCP Connections         |2
Encryption                                |Enabled (Algorithm: TLS_AES_256_GCM_SHA384)
Use of Compression                        |No (No Compression)
Physical Underlay Protocol                |Standard TCP/IP (IPv4)
                                          |IPv4 UDPAccel_Ver=2 ChachaPoly_OpenSSL UDPAccel_MSS=1309
UDP Acceleration is Supported             |Yes
UDP Acceleration is Active                |Yes
Session Name                              |SID-VPN_USER-13
Connection Name                           |CID-44
Session Key (160 bit)                     |DA22EBA9DA346D9977603E1828D0C0D69602F874
Bridge / Router Mode                      |No
Monitoring Mode                           |No
Outgoing Data Size                        |3,152 bytes
Incoming Data Size                        |4,538 bytes
Outgoing Unicast Packets                  |1 packets
Outgoing Unicast Total Size               |78 bytes
Outgoing Broadcast Packets                |8 packets
Outgoing Broadcast Total Size             |816 bytes
Incoming Unicast Packets                  |1 packets
Incoming Unicast Total Size               |86 bytes
Incoming Broadcast Packets                |31 packets
Incoming Broadcast Total Size             |2,608 bytes
The command completed successfully.

기동 스크립트

vpnstart.sh 편집

$ vim vpnstart.sh
#!/bin/bash

/usr/local/src/vpnclient/vpnclient start

/usr/local/src/vpnclient/vpncmd /client localhost /cmd AccountConnect DVPN

ifconfig vpn_tun0 192.168.160.241/24
#dhclient vpn_tun0

route add -host 222.222.111.111 gw 192.168.160.1
route add -host 222.222.112.111 gw 192.168.160.1

vpnstop.sh 편집

$ vim vpnstop.sh
#!/bin/bash

/usr/local/src/vpnclient/vpncmd /client localhost /cmd AccountDisconnect DVPN

/usr/local/src/vpnclient/vpnclient stop

 

 

0 Comments
댓글쓰기 폼