linode centos7 xl2tp ipsec

2018年2月14日更新:
aws的ip为172.31.26.41

iptables -t nat -A POSTROUTING -s 172.31.26.0/24 -o eth0 -j MASQUERADE
然后按照
[url]http://blog.youkuaiyun.com/kitvv/article/details/50696585[/url]
操作
psk的那个secure文件改成
13.115.181.153 %any: PSK "haha"


################
在aws上建立rhel7.1的虚拟机

PermitRootLogin yes
PasswordAuthentication yes

[ec2-user@ip-172-31-17-111 ~]$ cat /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.93 2014/01/10 05:59:19 djm Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.

# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# The default requires explicit activation of protocol 1
#Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

# Ciphers and keying
#RekeyLimit default none

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
#PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no
#PasswordAuthentication no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
#KerberosUseKuserok yes

# GSSAPI options
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
#GSSAPIEnablek5users no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
# WARNING: 'UsePAM no' is not supported in Red Hat Enterprise Linux and may cause several
# problems.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox # Default for new installations.
#PermitUserEnvironment no
#Compression delayed
ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS

# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
[ec2-user@ip-172-31-17-111 ~]$


参考
http://www.esojourn.org/blog/post/setup-l2tp-vpn-server-with-ipsec-in-centos6.php?page=2&part=1
使用xl2tp和ipsec,ppp让iphone和mac上网
注意的地方
1.尽量用新版本
2.配置的vpn用户名密码要是系统能登录的
3.http://pkgs.org/centos-7/nux-dextop-x86_64/xl2tpd-1.3.6-2.el7.nux.x86_64.rpm.html
下载对应的系统对应的rpm包 xl2tpd
rpm -ivh xl2tpd-1.3.6-8.el7.x86_64.rpm
4.yum install ppp openswan
openswan就是ipsec
5.我linode的ip是106.187.44.20,要替换下面的ip到你的ip

#!/bin/sh
for each in /proc/sys/net/ipv4/conf/*
do
echo 0 > $each/accept_redirects
echo 0 > $each/send_redirects
done


[code="java"]
# cat /etc/ipsec.conf
# /etc/ipsec.conf - Libreswan IPsec configuration file

# This file: /etc/ipsec.conf
#
# Enable when using this configuration file with openswan instead of libreswan
#version 2
#
# Manual: ipsec.conf.5

# basic configuration
config setup
# which IPsec stack to use, "netkey" (the default), "klips" or "mast".
# For MacOSX use "bsd"
oe=off
protostack=netkey
#
# The interfaces= line is only required for the klips/mast stack
#interfaces="%defaultroute"
#interfaces="ipsec0=eth0 ipsec1=ppp0"
#
# If you want to limit listening on a single IP - not required for
# normal operation
#listen=127.0.0.1
#
# Do not set debug options to debug configuration issues!
#
# plutodebug / klipsdebug = "all", "none" or a combation from below:
# "raw crypt parsing emitting control kernel pfkey natt x509 dpd
# private".
# Note: "crypt" is not included with "all", as it can show confidential
# information. It must be specifically specified
# examples:
# plutodebug="control parsing"
# plutodebug="all crypt"
# Again: only enable plutodebug or klipsdebug when asked by a developer
#plutodebug=none
#klipsdebug=none
#
# Normally, pluto logs via syslog. If you want to log to a file,
# specify below or to disable logging, eg for embedded systems, use
# the file name /dev/null
# Note: SElinux policies might prevent pluto writing to a log file at
# an unusual location.
#plutostderrlog=/var/log/pluto.log
#
# Enable core dumps (might require system changes, like ulimit -C)
# This is required for abrtd to work properly
# Note: SElinux policies might prevent pluto writing the core at
# unusual locations
dumpdir=/var/run/pluto/
#
# NAT-TRAVERSAL support
# exclude networks used on server side by adding %v4:!a.b.c.0/24
# It seems that T-Mobile in the US and Rogers/Fido in Canada are
# using 25/8 as "private" address space on their wireless networks.
# This range has not been announced via BGP (at least upto 2010-12-21)
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v6:fd00::/8,%v6:fe80::/10

# Add connections here

# For example connections, see your distribution's documentation directory,
# or the documentation which could be located at
# /usr/share/docs/libreswan-3.*/ or look at https://www.libreswan.org/
#
# There is also a lot of information in the manual page, "man ipsec.conf"

# You may put your configuration (.conf) file in the "/etc/ipsec.d/" directory
# by uncommenting this line
#include /etc/ipsec.d/*.conf
conn L2TP-PSK-NAT
rightsubnet=vhost:%priv
also=L2TP-PSK-noNAT

conn L2TP-PSK-noNAT
authby=secret
pfs=no
auto=add
keyingtries=3
rekey=no
ikelifetime=8h
keylife=1h
type=transport
left=172.31.17.111
# leftid=52.74.143.66
# leftprotoport=17/1701
leftprotoport=17/%any
right=%any
right=%any
[/code]
[color=darkred]17/%any 和ifconfig得到的内网ip,这里注意一下[/color]
[code="java"]
# cat /etc/ipsec.secrets
include /etc/ipsec.d/*.secrets
106.187.44.20 %any: PSK "haha"
[/code]

[code="java"]
# cat /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.eth0.rp_filter = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.log_martians = 0
net.ipv4.conf.default.log_martians = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.icmp_ignore_bogus_error_responses = 1
[/code]

验证
sysctl -p
service ipsec start
ipsec verify

可用的时候是这样的
[code="java"]
# ipsec verify
Verifying installed system and configuration files

Version check and ipsec on-path [OK]
Libreswan 3.8 (netkey) on 3.15.4-x86_64-linode45
Checking for IPsec support in kernel [OK]
NETKEY: Testing XFRM related proc values
ICMP default/send_redirects [OK]
ICMP default/accept_redirects [OK]
XFRM larval drop [OK]
Pluto ipsec.conf syntax [OK]
Hardware random device [N/A]
Two or more interfaces found, checking IP forwarding [OK]
Checking rp_filter [OK]
Checking that pluto is running [OK]
Pluto listening for IKE on udp 500 [OK]
Pluto listening for IKE/NAT-T on udp 4500 [OK]
Pluto ipsec.secret syntax [OK]
Checking NAT and MASQUERADEing [TEST INCOMPLETE]
Checking 'ip' command [OK]
Checking 'iptables' command [OK]
Checking 'prelink' command does not interfere with FIPSChecking for obsolete ipsec.conf options [OK]
Opportunistic Encryption [DISABLED]
#
[/code]

[code="java"]
[color=red]listen-addr 注意这里的ip如果外网不通就用内网的[/color]
# cat /etc/xl2tpd/xl2tpd.conf
;
; This is a minimal sample xl2tpd configuration file for use
; with L2TP over IPsec.
;
; The idea is to provide an L2TP daemon to which remote Windows L2TP/IPsec
; clients connect. In this example, the internal (protected) network
; is 192.168.1.0/24. A special IP range within this network is reserved
; for the remote clients: 192.168.1.128/25
; (i.e. 192.168.1.128 ... 192.168.1.254)
;
; The listen-addr parameter can be used if you want to bind the L2TP daemon
; to a specific IP address instead of to all interfaces. For instance,
; you could bind it to the interface of the internal LAN (e.g. 192.168.1.98
; in the example below). Yet another IP address (local ip, e.g. 192.168.1.99)
; will be used by xl2tpd as its address on pppX interfaces.

[global]
;listen-addr = 106.187.44.20
;ipsec saref = no
;
; requires openswan-2.5.18 or higher - Also does not yet work in combination
; with kernel mode l2tp as present in linux 2.6.23+
; ipsec saref = yes
; Use refinfo of 22 if using an SAref kernel patch based on openswan 2.6.35 or
; when using any of the SAref kernel patches for kernels up to 2.6.35.
; saref refinfo = 30
;
; force userspace = yes
;
; debug tunnel = yes

[lns default]
ip range = 192.168.1.128-192.168.1.254
local ip = 192.168.1.99
require chap = yes
refuse pap = yes
require authentication = yes
name = LinuxVPNserver
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
[/code]

[code="java"]
# cat /etc/ppp/options.xl2tpd
require-mschap-v2
ipcp-accept-local
ipcp-accept-remote
#ms-dns 106.187.36.20
ms-dns 8.8.4.4
ms-dns 8.8.8.8
# ms-dns 192.168.1.1
# ms-dns 192.168.1.3
# ms-wins 192.168.1.2
# ms-wins 192.168.1.4
noccp
auth
crtscts
idle 1800
mtu 1410
mru 1410
nodefaultroute
debug
lock
proxyarp
connect-delay 5000
# To allow authentication against a Windows domain EXAMPLE, and require the
# user to be in a group "VPN Users". Requires the samba-winbind package
# require-mschap-v2
# plugin winbind.so
# ntlm_auth-helper '/usr/bin/ntlm_auth --helper-protocol=ntlm-server-1 --require-membership-of="EXAMPLE\\VPN Users"'
# You need to join the domain on the server, for example using samba:
# http://rootmanager.com/ubuntu-ipsec-l2tp-windows-domain-auth/setting-up-openswan-xl2tpd-with-native-windows-clients-lucid.html

[/code]

[code="java"]
# cat /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
root * 我的密码 *
[/code]


yum install iptables-services
systemctl enable iptables
[code="java"]
# cat /etc/sysconfig/iptables
*nat
:PREROUTING ACCEPT [39:3503]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE

COMMIT

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [121:13264]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 1194 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 1701 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 500 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 4500 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -d 192.168.1.0/24 -j ACCEPT
-A FORWARD -s 192.168.1.0/24 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited

COMMIT
[/code]
COMMIT 注意要有换行

xl2tpd -D &
service iptables restart
ipsec restart

----------------ubuntu14.04 aws
设置root的ssh

ssh出现permission denied (publickey)问题:
修改/etc/ssh/sshd-config文件.
将其中的PermitRootLogin no修改为yes
PubkeyAuthentication yes修改为no
AuthorizedKeysFile .ssh/authorized_keys前面加上#屏蔽掉,
PasswordAuthentication no修改为yes就可以了。

重启sshd即可:service sshd restart

------------------------------------------------------------
------------------------------------------------------------
ubuntu14.04参考
https://raymii.org/s/tutorials/IPSEC_L2TP_vpn_with_Ubuntu_14.04.html

apt-get install iptables-persistent
apt-get install ppp openswan xl2tpd
也没好使
http://crazyof.me/blog/archives/610.html

http://www.enjoydiy.com/213.html


http://ubuntuforums.org/showthread.php?t=2211939

"I also make it my habit to make leftprotoport 17/%any instead of 17/1701"

vim /etc/ipsec.conf

config setup
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
oe=off
protostack=netkey

conn L2TP-PSK-NAT
rightsubnet=vhost:%priv
also=L2TP-PSK-noNAT

conn L2TP-PSK-noNAT
authby=secret
pfs=no
auto=add
keyingtries=3
rekey=no
ikelifetime=8h
keylife=1h
type=transport
left=172.31.30.234
leftprotoport=17/%any
right=%any
rightprotoport=17/%any

[color=red]注意,left为内网ifconfig的ip,leftprotoport=17/%any 一定要这么写,写成1701会报错[/color]

cat /etc/rc.local

iptables --table nat --append POSTROUTING --jump MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
for each in /proc/sys/net/ipv4/conf/*
do
echo 0 > $each/accept_redirects
echo 0 > $each/send_redirects
done

exit 0

cat /etc/iptables/rules.v4

# Generated by iptables-save v1.4.21 on Mon Nov 24 04:44:08 2014
#*filter
#:INPUT ACCEPT [0:0]
#:FORWARD ACCEPT [0:0]
#:OUTPUT ACCEPT [0:0]
#COMMIT
# Completed on Mon Nov 24 04:44:08 2014
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*nat
:PREROUTING ACCEPT [39:3503]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -s 192.168.3.0/24 -o eth0 -j MASQUERADE
COMMIT

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
#:OUTPUT ACCEPT [0:0]
:OUTPUT ACCEPT [121:13264]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 1194 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 1701 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 500 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 500 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 4500 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -d 192.168.3.0/24 -j ACCEPT
-A FORWARD -s 192.168.3.0/24 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT


cat /etc/xl2tpd/xl2tpd.conf

[global]
ipsec saref = no
[lns default]
ip range = 192.168.3.128-192.168.3.254
local ip = 192.168.3.1
require chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes

网段和iptables配置的网段要一样,不能是已经存在的网段
cat /etc/ppp/chap-secrets

# Secrets for authentication using CHAP
# client server secret IP addresses
hey * heyman *

useradd hey
passwd hey
heyman


cat /etc/ipsec.secrets

root@ip-172-31-30-234:/home/ubuntu# cat /etc/ipsec.secrets
# This file holds shared secrets or RSA private keys for inter-Pluto
# authentication. See ipsec_pluto(8) manpage, and HTML documentation.

# RSA private key for this host, authenticating it to any other host
# which knows the public part. Suitable public keys, for ipsec.conf, DNS,
# or configuration of other implementations, can be extracted conveniently
# with "ipsec showhostkey".

# this file is managed with debconf and will contain the automatically created RSA keys
#include /var/lib/openswan/ipsec.secrets.inc
172.31.30.234 %any: PSK "haha"


root@ip-172-31-30-234:/data/meatspace-chat# cat /etc/ppp/options.xl2tpd
require-mschap-v2
ms-dns 8.8.8.8
asyncmap 0
auth
crtscts
lock
hide-password
modem
debug
name l2tpd
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4

ip为ifconfig的内网ip
设置
/etc/sysctl.conf 上面
sysctl -p

/etc/init.d/iptables-persistent restart
service ipsec restart
servcie xl2tpd restart


tailf /var/log/secure 看访问的log
r如果有尝试密码的使用
/etc/hosts.deny
all:218.87.111.110
禁止
iphone访问的话
[img]http://dl2.iteye.com/upload/attachment/0108/8181/dadbe13d-d224-3d79-8349-9af7e27f2f98.jpg[/img]
Centos7 搭建xl2tpd + ipsec vpn xl2tpd + ipsec 阅读详情

相关推荐

如何在Debug模式下运行xl2tpd

本文描述了如何在Debug模式下运行xl2tpd进程,以及如何输出与保存、查找更多调试信息,

qq_42000667的博客 2000

ubuntu 16.04 L2TP

由于自己的网络(路由器?)不支持PPTP,只有使用L2TP来连接VPN。 其实,之前可以使用 sudo apt-get install l2tp-ipsec-vpn 安装 l2tp-ipsec-vpn 但是,新的版本把这个package去掉了。如今使用xl2tp和strongswan,而这两个东西并不是安装好就行了,离连接VPN远着。 在网上找到 一个 教程 Enabli

hhbgk的专栏 2万+

ubantu虚拟机搭建xl2tp服务

在编译成功源码,安装完毕xl2tpd后,便可以配置xl2tpd服务。基本配置过程主要涉及两个配置文件:一个用来配置xl2tpd, 一个用来配置ppp协议。下面分别对这两个文件进行说明,最后添加xl2tpd服务搭建过程。 具体信息也可以通过man来查看: man xl2tpd :启动xl2tpd服务命令行传递参数说明 man xl2tpd-control : 对xl2...

遇见你是我最美丽的意外 7223

xl2tpd源码分析

1.软件版本:        xl2tpd-devel-20151125.tar.gz 2.源码框架: 3.源码详解:      xl2tpd源码的主函数非常简洁,具体代码如下: File:xl2tpd.c ------------------------------------------------------------------------------

eydwyz的专栏 4613

openwrt 编译出现bash: line 0: [:penwrt/bin/ramips/packages/base/xl2tpd_1.3.6 : binary operator expected

openwrt编译出现如下错误: install -d -m0755 /Openwrt/bin/ramips/packages/base ipkg-build -c -o 0 -g 0 /Openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/xl2tpd-1.3.6/ipkg-ramips_24kec/xl2tpd /Openwrt/bin/ramips/packages/base Packaged contents of /Openwrt/

wgl307293845的博客 607

centos7搭建基于strongswan ipsec的 l2tp服务器

centos7下搭建ipsec l2tp服务器,使用strongswan来构建ipsec.

L2TP/IPSEC搭建详细步骤

长沙分公司访问北京总公司的办公OA业务,本文利旧总公司的linux服务器搭建L2TP/IPSEC打通两地内网,达到安全访问的目的。

goinggo的博客 3万+

xl2tpd-1.3.0开源源代码

xl2tpd-1.3.0可用于l2tp的lns或者服务器端,这是个开源的代码库

CentOS 7 常用操作

CentOS 7 常用操作最近老是在折腾 CentOS 7,因为 7 和之前的 6.X 版本有较大改动,许多的 linux 命令也作出了相应的修改。

Xue Shengke 博客 1774

dos攻击 --hping3

dos使用hping3攻击

qq_65880213的博客 2747

【雷达成像实战】RD、CS、RMA算法对比与Matlab实现:从信号处理到高清成像

本文深入对比了雷达成像中三种核心算法:经典的距离多普勒算法(RD)、基于稀疏重建的压缩感知算法(CS)以及高精度的快速多通道获取算法(RMA)。通过详细的Matlab实战代码,从原理拆解到实现步骤,分析了各自在计算效率、成像精度、数据需求和适用场景上的优劣,为工程选型与算法实践提供了清晰指南。

weixin_29095587的博客 447

CentOS7.2 安装L2TP/IPSec 服务端/客户端 和部分心得 ( libreswan+xl2tpd )

整体基于CentOS7.2实现。方案为“使用预共享密钥的L2TP/IPSec” 下载地址:http://download.csdn.net/download/gogoytgo/10266198 参考资料:https://teddysun.com/448.html 在此一键安装脚本上,删除了部分功能: 1)不配置防火墙,因为我们的业务不需要也不希望通过VPN直接转接到其他网络,而是通过程序实...

gogoytgo的博客 1万+

AutoDL上传数据详细步骤(自己用的步骤,可能没有其他大佬用的那么高级)

AutoDL上传数据详细步骤(自己用的步骤,可能没有其他大佬用的那么高级)

孟孟单单的博客 7万+

也用CentOS7设置L2TP

 上网找一些资料,意外发现这个文章,挺有用。自己摸索设置成功了。用的vultr 就用系统默认安装的,版本是7.4.1708 一点小意外,就是windows客户端随意设置的没有连上,意味失败了, 结果用苹果手机连接发现没问题,才知道是windows客户端设置的问题。 https://www.cnblogs.com/think8848/p/6347880.html CentOS 7.2

linghu51的博客 3040

嵌入式开发中SAR与ΔΣ ADC选型指南:从原理到实战应用

模数转换器是嵌入式系统连接模拟世界与数字世界的核心接口,其选型直接决定了数据采集的精度与可靠性。SAR ADC采用逐次逼近原理,如同天平称重,通过二进制搜索快速完成转换,具备高速、多通道轮询的优势,适合电机控制、通信等动态场景。ΔΣ ADC则基于过采样与噪声整形技术,以速度换取精度,通过数字滤波输出高分辨率结果,在传感器测量、音频采集等静态高精度领域表现卓越。理解这两种架构的工作原理差异,是进行嵌入式ADC选型的基础。在实际工程中,需结合信号带宽、多通道切换需求、功耗约束及PCB布局能力进行综合权衡。例如,

weixin_30140399的博客 244

mot_challenge官方评估代码

mot_challenge官方代码使用介绍 评估mot17验证集:每个视频序列的后一半帧作为验证集 下载源码:git clone https://hub.fastgit.org/JonathonLuiten/TrackEval.git 官网上下载data样例,放在TrackEval/下,结构如下: data |-- gt | |-- bdd100k | |-- davis | |-- kitti | |-- mot_challenge | | |-- MOT15-train |

qq_37866436的博客 4894

搭建廉价的网游加速器CentOS.7-PPTP-L2TP

注意检查CentOS7-pptp-host1plus.sh的地址是否还有效。username、password是自己的登录用户名和密码。但密码长度必须大于8个 ASCII字符,否则为了安全,脚本将会随机生成密码。CentOS7-pptp-host1plus.sh 源码for7Copyright()2015-2016;/;2,,;.for.if。

qq_38431115的博客 1817

C#与倍福Plc通信——使用仿真软件模拟倍福PLC运行

安装这个软件之前先安装VisualStudio,本文安装这个软件时已经安装了VisualStudio2019。1、下载倍福PLC编程软件TwinCAT。

qq_34059233的博客 3664

Centos7.5 系统使用L2TP/IPSec搭建服务器

一、L2TP介绍1、L2TP定义L2TP(Layer 2 Tunneling Protocol,二层隧道协议),通过公共网络(如Internet)上建立点到点的L2TP隧道,将PPP(Point-to-Point Protocol,点对点协议)数据帧封装后通过L2TP隧道传输,使得远端用户利用PPP接入公共网络后,能够通过L2TP隧道与企业内部网络通信...

weixin_34037515的博客 6844

WS2812和homeassistant握手

本文学习了WS2812和homeassistant握手,后期会分享更多有趣物联网的操作从而实现对外部世界进行感知,充分认识这个有机与无机的环境,科学地合理地进行创作和发挥效益,然后为人类社会发展贡献一点微薄之力。...

vor234的博客 811

SAP BTP ABAP RAP 开发对象命名规范与落地实践

摘要:SAP BTP ABAP开发中的命名规范实践 在企业级ABAP开发中,命名规范是提升交付效率的工程化手段。SAP推荐采用[/<namespace>/][<prefix>]_<object_name>_[<suffix>]的结构化命名框架,解决多对象、多团队的协同问题。关键实践包括:使用组织专属命名空间避免冲突;通过prefix区分同类型对象的不同语义(如UI_/API_);object_name体现业务语义而非技术细节;suffix表达次级差异。在具体对

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 1433

Centos7配置L2TP/IPSEC服务器

配置L2TP/IPSEC服务器 在开始配置前,最好确认服务器上SELINUX处于关闭状态,不然可能出现奇怪的报错 getenforce # 检查selinux状态,若输出:permissive或disabled 表示selinux已关闭 否则 执行 setenforce 0 # 设置SELINUX为permissive模式即可 查看主机是否支持pptp modprobe ppp-compre...

anke的博客 5749

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

嵌入式linux 搭建L2TP+IPSEC客户端

搭建L2TP+IPSEC客户端需要对应的源码 xl2tpd-1.3.10和openswan,还需要一些依赖的库,gmp,libpcap。一、安装openswan安装依赖库gmp-6.1.21、下载:https://gmplib.org/#DOWNLOAD2、配置./configure --host=arm-hisiv100nptl-linux --with-pcap=linux --prefix=...

Jayson 博客 1万+

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

centos7 xl2tp服务器搭建

为了方便不在公司网络上网的个人用户能访问公司内网资源,需要搭建各种安全隧道服务器供使用,可通过在网络设备上配置pptp/l2tp/ipsec/ssl等协议,也可以通过在Windows server服务器上搭建各种安全隧道服务,比如sstp安全隧道,也可以在Linux服务器上搭建pptp/l2tp/ipsec安全隧道,其中网络设备上SSL和pptp协议的安全隧道在MAC电脑上的兼容性极差。 下面...

松果177的博客 8382

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

上一篇: linux下编译objectc
下一篇: ios指南针
linux内核控
博客等级 码龄19年 41粉丝 638原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值