ubuntu 配置L2tp出現的問題解決

運行環境:ubuntu 14.04 64位html

 

配置推薦網址:linux

https://linux.cn/article-3409-1.htmlubuntu


首先,官方教程是必須的:dom

https://help.ubuntu.com/community/L2TPServer
沒有安照這個作過了就先不要處處百度「如何部署L2TP」之類的了。先參閱Official Ubuntu Documentation。測試


主要的問題出在:命令行

sudo ipsec verifyhtm

這一步。由於官方要求是獲得一個沒有任何錯誤的反饋。教程

在第一次測試的時候我出現了2個[FAILED],具體狀況以下:
Checking your system to see if IPsec got installed and started correctly:ip

Version check and ipsec on-path [OK]ci

Linux Openswan U2.6.38/K3.13.0-52-generic (netkey)

Checking for IPsec support in kernel [OK]

SAref kernel support [N/A]

NETKEY: Testing XFRM related proc values [FAILED]


Please disable /proc/sys/net/ipv4/conf/*/send_redirects

or NETKEY will cause the sending of bogus ICMP redirects!


[FAILED]


Please disable /proc/sys/net/ipv4/conf/*/accept_redirects

or NETKEY will accept bogus ICMP redirects!


[OK]

Hardware RNG detected, testing if used properly [FAILED]


Hardware RNG is present but 'rngd' or 'clrngd' is not running.

No harware random used!


Checking that pluto is running [OK]

Pluto listening for IKE on udp 500 [OK]

Pluto listening for NAT-T on udp 4500 [OK]

Checking for 'ip' command [OK]

Checking /bin/sh is not /bin/dash [WARNING]

Checking for 'iptables' command [OK]

Opportunistic Encryption Support [DISABLED]

 

咱們先解決:

NETKEY: Testing XFRM related proc values [FAILED]

解決方案:在命令行裏黏貼如下命令


for each in /proc/sys/net/ipv4/conf/*

> do

> echo 0 > $each/accept_redirects

> echo 0 > $each/send_redirects

> done


而後解決:


Hardware RNG detected, testing if used properly [FAILED]


Hardware RNG is present but 'rngd' or 'clrngd' is not running.

No harware random used!

解決方案:

sudo apt-get install rng-tools

相關文章
相關標籤/搜索