Redhat 7LinuxでCiscoVPNクライアント接続を作成する最も簡単な方法は、vpnc
を使用することです。 CiscoVPNクライアントのオープンソース代替であるクライアント。 RHEL7へのVPNCのインストールから始めましょう。 VPNCパッケージはEPEL(Enterprise Linux 7の追加パッケージ)リポジトリ内にあるため、最初にEPELリポジトリを有効にします。
# subscription-manager repos --enable=rhel-7-server-optional-rpms
現在のRedhatサブスクリプションをお持ちでない場合は、サブスクリプションなしでEPELを有効にする方法について、このガイドに従ってください。
完了したら、vpnc
をインストールします。 パッケージ:
# yum install vpnc
これで、vpnc
ができました。 クライアントがインストールされているので、VPNCisco接続を作成する準備ができています:
[root@rhel7 ~]# vpnc Enter IPSec gateway address: vpn.hostname.example Enter IPSec ID for vpn.hostname.example: VPNClient Enter IPSec secret for [email protected]: Enter username for vpn.hostname.example: username Enter password for [email protected]: Connect Banner: | You are now connected to the VPN System. Unauthorized usage is not permitted. | VPNC started in background (pid: 3707)...
上記により、新しいVPN tun(n)ネットワークインターフェイスが作成されます。
tun0: flags=4305<up,pointopoint,running,noarp,multicast> mtu 1412 inet 141.17.140.55 netmask 255.255.255.255 destination 131.217.240.35 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 </up,pointopoint,running,noarp,multicast>
または、VPNC設定ファイルを作成して、CiscoVPN認証をより自動化することもできます。
[root@rhel7 ~]# cat /etc/vpnc/default.conf IPSec gateway vpn.hostname.example IPSec ID GROUPNAME IPSec secret GROUPPASS Xauth username username Xauth password my-password
vpnc
これで、デフォルトの設定ファイルが存在するかどうかが確認され、CiscoVPN接続が自動的に作成されます。パスワードは省略できます。vpnc
を実行すると、VPNパスワードの入力を求められます。 コマンド:
# vpnc Connect Banner: | You are now connected to the VPN System. Unauthorized usage is not permitted. VPNC started in background (pid: 3777)...
複数のVPN接続を作成したい場合は、複数のVPN構成ファイルを自由に作成してください。その後、vpnc
を使用してCiscoVPN接続を開始できます。 コマンドを実行し、同時に構成ファイル名を指定します。例:
[root@rhel7 vpnc]# cp default.conf cisco-vpn.conf [root@rhel7 vpnc]# vpnc cisco-vpn
Cisco VPNゲートウェイから切断するには、次のコマンドを実行します。
[root@rhel7 ~]# vpnc-disconnect Terminating vpnc daemon (pid: 3777)