Servidor VPN IPSec / L2TP com vários IP: conectar-se com falha ip diferente

3

Eu configurei um servidor VPN IPSec / L2TP no EC2 executando o Ubuntu Server 12.04 com o openswan 2.6.37 / xl2tpd 1.3.1. É bem sucedido Quando me conecto com o IP padrão (IP privado: 172.31.14.4, IP público: 54.69.159.5), mas é falha se eu conectar a largura segundo IP (IP privado: 172.31.1.40, IP pubiano: 54.68.144.45).

Eu quero definir este servidor vpn pode se conectar com IP diferente e fazer o IP do cliente mostrar como o IP público VPN de conexão.

Aqui está o log quando a conexão de erro:

/ var / log / syslog

Jun 30 11:03:16 hostname xl2tpd[9964]: get_call: allocating new tunnel for host x.x.x.x, port 1701.
Jun 30 11:03:18 hostname xl2tpd[9964]: get_call: allocating new tunnel for host x.x.x.x, port 1701.
Jun 30 11:03:18 hostname xl2tpd[9964]: control_finish: Peer requested tunnel 2 twice, ignoring second one.
Jun 30 11:03:18 hostname xl2tpd[9964]: build_fdset: closing down tunnel 51911
Jun 30 11:03:19 hostname xl2tpd[9964]: get_call: allocating new tunnel for host x.x.x.x, port 1701.
Jun 30 11:03:19 hostname xl2tpd[9964]: control_finish: Peer requested tunnel 2 twice, ignoring second one.
Jun 30 11:03:19 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:19 hostname xl2tpd[9964]: build_fdset: closing down tunnel 32530
Jun 30 11:03:19 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:23  xl2tpd[9964]: last message repeated 3 times
Jun 30 11:03:23 hostname xl2tpd[9964]: get_call: allocating new tunnel for host x.x.x.x, port 1701.
Jun 30 11:03:23 hostname xl2tpd[9964]: control_finish: Peer requested tunnel 2 twice, ignoring second one.
Jun 30 11:03:23 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:23 hostname xl2tpd[9964]: build_fdset: closing down tunnel 44586
Jun 30 11:03:23 hostname xl2tpd[9964]: Maximum retries exceeded for tunnel 32176.  Closing.
Jun 30 11:03:23 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:23 hostname xl2tpd[9964]: Connection 2 closed to x.x.x.x, port 1701 (Timeout)
Jun 30 11:03:24 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:28  xl2tpd[9964]: last message repeated 3 times
Jun 30 11:03:28 hostname xl2tpd[9964]: Unable to deliver closing message for tunnel 32176. Destroying anyway.
Jun 30 11:03:31 hostname xl2tpd[9964]: get_call: allocating new tunnel for host x.x.x.x, port 1701.
Jun 30 11:03:33 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:38  xl2tpd[9964]: last message repeated 4 times
Jun 30 11:03:38 hostname xl2tpd[9964]: Maximum retries exceeded for tunnel 55170.  Closing.
Jun 30 11:03:38 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:38 hostname xl2tpd[9964]: Connection 2 closed to x.x.x.x, port 1701 (Timeout)
Jun 30 11:03:39 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:40 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:41 hostname xl2tpd[9964]: get_call: allocating new tunnel for host x.x.x.x, port 1701.
Jun 30 11:03:41 hostname xl2tpd[9964]: control_finish: Peer requested tunnel 2 twice, ignoring second one.
Jun 30 11:03:41 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:41 hostname xl2tpd[9964]: build_fdset: closing down tunnel 16380
Jun 30 11:03:41 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:42 hostname xl2tpd[9964]: udp_xmit failed to x.x.x.x:1701 with err=-1:Operation not permitted
Jun 30 11:03:43 hostname xl2tpd[9964]: Unable to deliver closing message for tunnel 55170. Destroying anyway.

Aqui está minha configuração:

/etc/ipsec.conf

config setup
    dumpdir=/var/run/pluto/
    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,%v6:fd00::/8,%v6:fe80::/10
    oe=off
    protostack=netkey

conn %default
    forceencaps=yes

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.14.4
    leftprotoport=17/1701
    right=%any
    rightprotoport=17/%any

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

/etc/xl2tpd/xl2tpd.conf

[global]
ipsec saref = yes
debug tunnel = yes

[lns default]
ip range = 10.1.2.2-10.1.2.20
local ip = 10.1.2.1
refuse chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes

/etc/ppp/options.xl2tpd

require-mschap-v2
ms-dns 8.8.8.8
ms-dns 8.8.4.4
asyncmap 0
auth
crtscts
lock
hide-password
modem
debug
name l2tpd
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
    
por phpstone 30.06.2015 / 05:22

1 resposta

0

Não tenho certeza se você ainda precisa da resposta, mas nunca vi uma resposta no Google para problemas semelhantes. Eu tenho um único par de IPs na minha instância do EC2, mas o mesmo erro no log: udp_xmit failed... Operation not permitted . Esta edição na configuração me ajudou: nat_traversal=no .

    
por 10.11.2016 / 20:00

Tags