New Member
Posts: 19
Registered: ‎05-07-2013
Kudos: 1
Accepted Solution

L2TP server access problem

[ Edited ]

can't access VPN L2TP

PPTP works ok

 

What's wrong with config?

 

firewall {
    all-ping enable
    broadcast-ping disable
    conntrack-expect-table-size 4096
    conntrack-hash-size 4096
    conntrack-table-size 32768
    conntrack-tcp-loose enable
    ipv6-receive-redirects disable
    ipv6-src-route disable
    ip-src-route disable
    log-martians enable
    modify pppoe-out {
        description "TCP clamping"
        rule 1 {
            action modify
            modify {
                tcp-mss 1452
            }
            protocol tcp
            tcp {
                flags SYN
            }
        }
    }
    name eth0-in {
        default-action accept
        description "Wired network to other networks."
    }
    name eth0-local {
        default-action accept
        description "Wired network to router."
    }
    name eth1-in {
        default-action accept
        description "Wireless network to other networks"
    }
    name eth1-local {
        default-action accept
        description "Wireless network to router."
    }
    name pppoe-in {
        default-action drop
        description "Internet to internal networks"
        rule 1 {
            action accept
            description "Allow established/related"
            log disable
            state {
                established enable
                related enable
            }
        }
        rule 2 {
            action drop
            description "Drop invalid state"
            log enable
            state {
                invalid enable
            }
        }
    }
    name pppoe-local {
        default-action drop
        description "Internet to router"
        rule 1 {
            action accept
            description "Allow established/related"
            log disable
            state {
                established enable
                related enable
            }
        }
        rule 2 {
            action drop
            description "Drop invalid state"
            log enable
            state {
                invalid enable
            }
        }
        rule 3 {
            action accept
            description "allow pptp"
            destination {
                port 1723
            }
            log disable
            protocol tcp
            source {
            }
        }
        rule 4 {
            action accept
            description "allow pptp gre"
            log disable
            protocol gre
        }
        rule 5 {
            action accept
            description "allow l2tp ike"
            destination {
                port 500
            }
            log disable
            protocol udp
        }
        rule 6 {
            action accept
            description "allow l2tp"
            destination {
                port 1701
            }
            log disable
            protocol udp
        }
        rule 7 {
            action accept
            description "allow l2tp esp"
            log disable
            protocol esp
        }
        rule 8 {
            action accept
            description "allow l2tp nat-t"
            destination {
                port 4500
            }
            log disable
            protocol udp
        }
        rule 9 {
            action accept
            description "ICMP 50/m"
            limit {
                burst 1
                rate 50/minute
            }
            log enable
            protocol icmp
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        address 192.168.1.1/24
        duplex auto
        firewall {
            in {
                name eth0-in
            }
            local {
                name eth0-local
            }
        }
        speed auto
    }
    ethernet eth1 {
        address 192.168.2.1/24
        disable
        duplex auto
        firewall {
            in {
                name eth1-in
            }
            local {
                name eth1-local
            }
        }
        speed auto
    }
    ethernet eth2 {
        duplex auto
        firewall {
            in {
            }
            local {
            }
        }
        mac *:*:*:*:*:*
        pppoe 0 {
            default-route auto
            firewall {
                in {
                    name pppoe-in
                }
                local {
                    name pppoe-local
                }
                out {
                    modify pppoe-out
                }
            }
            mtu 1492
            name-server auto
            password ***
            user-id ***
        }
        speed auto
    }
    loopback lo {
    }
}
service {
    dhcp-server {
        disabled false
        shared-network-name wired-eth0 {
            authoritative disable
            description "Wired Network - Eth1"
            subnet 192.168.1.0/24 {
                default-router 192.168.1.1
                dns-server 192.168.1.1
                lease 86400
                ntp-server 192.168.1.1
                start 192.168.1.10 {
                    stop 192.168.1.100
                }
                static-mapping storage {
                    ip-address 192.168.1.2
                    mac-address e0:69:95:2b:d0:41
                }
                time-server 192.168.1.1
            }
        }
        shared-network-name wireless-eth1 {
            authoritative disable
            description "Wireless Network - Eth2"
            disable
            subnet 192.168.2.0/24 {
                default-router 192.168.2.1
                dns-server 192.168.2.1
                lease 86400
                ntp-server 192.168.2.1
                start 192.168.2.10 {
                    stop 192.168.2.100
                }
                time-server 192.168.2.1
            }
        }
    }
    dns {
        forwarding {
            cache-size 150
            listen-on eth0
            listen-on eth1
            system
        }
    }
    gui {
        https-port 443
        listen-address 192.168.1.1
        listen-address 192.168.2.1
    }
    nat {
        rule 5010 {
            log disable
            outbound-interface pppoe0
            protocol all
            type masquerade
        }
    }
    ssh {
        listen-address 192.168.1.1
        listen-address 192.168.2.1
        port 22
        protocol-version v2
    }
    upnp {
        listen-on eth0 {
            outbound-interface pppoe0
        }
        listen-on eth1 {
            outbound-interface pppoe0
        }
    }
}
system {
    host-name ubnt
    ipv6 {
        disable
    }
    login {
        user dima {
            authentication {
                encrypted-password ***
                plaintext-password ""
            }
            full-name "dima"
            level admin
        }
    }
    name-server 208.67.222.222
    name-server 208.67.220.220
    ntp {
        server 0.ubnt.pool.ntp.org {
        }
        server 1.ubnt.pool.ntp.org {
        }
        server 2.ubnt.pool.ntp.org {
        }
        server 3.ubnt.pool.ntp.org {
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone Europe/Moscow
}
vpn {
    ipsec {
        ipsec-interfaces {
            interface pppoe0
        }
        nat-networks {
            allowed-network 0.0.0.0/0 {
            }
        }
        nat-traversal enable
    }
    l2tp {
        remote-access {
            authentication {
                local-users {
                    username *** {
                        password *** (same for pre-shared-secret)
                    }
                }
                mode local
            }
            client-ip-pool {
                start 10.1.0.130
                stop 10.1.0.170
            }
            ipsec-settings {
                authentication {
                    mode pre-shared-secret
                    pre-shared-secret ***
                }
                ike-lifetime 3600
            }
            outside-address 10.1.0.124
            outside-nexthop 10.1.0.1
        }
    }
    pptp {
        remote-access {
            authentication {
                local-users {
                    username *** {
                        password ***
                    }
                }
                mode local
            }
            client-ip-pool {
                start 192.168.1.231
                stop 192.168.1.255
            }
            mtu 1492
        }
    }
}


/* Warning: Do not remove the following line. */
/* === vyatta-config-version: "config-management@1:dhcp-relay@1:dhcp-server@4:firewall@4:ipsec@3:nat@3:qos@1:quagga@2:system@4:ubnt-pptp@1:vrrp@1:webgui@1:webproxy@1:zone-policy@1" === */
/* Release version: v1.1.0.4543695.130312.1019 */

 


Accepted Solutions
Ubiquiti Employee
Posts: 2,991
Registered: ‎02-04-2013
Kudos: 354
Solutions: 289

Re: L2TP server access problem

Replace 10.1.0.124 with the WAN IP(213.141.***.***), replace 10.1.0.1 with the default gateway IP("show ip route" can tell), and the client-ip-pool with a range like 192.168.3.10 - 192.168.3.19

View solution in original post


All Replies
Ubiquiti Employee
Posts: 2,991
Registered: ‎02-04-2013
Kudos: 354
Solutions: 289

Re: L2TP server access problem


@mladshiy wrote:

can't access VPN L2TP

PPTP works ok

 

What's wrong with config?

 

vpn {
    ipsec {
        ipsec-interfaces {
            interface pppoe0
        }
        nat-networks {
            allowed-network 0.0.0.0/0 {
            }
        }
        nat-traversal enable
    }
    l2tp {
        remote-access {
            authentication {
                local-users {
                    username *** {
                        password *** (same for pre-shared-secret)
                    }
                }
                mode local
            }
            client-ip-pool {
                start 10.1.0.130
                stop 10.1.0.170
            }
            ipsec-settings {
                authentication {
                    mode pre-shared-secret
                    pre-shared-secret ***
                }
                ike-lifetime 3600
            }
            outside-address 10.1.0.124
            outside-nexthop 10.1.0.1
        }
    }

 


Is 10.1.0.124 on the ERL? Could you provide "show interfaces" output? 

New Member
Posts: 19
Registered: ‎05-07-2013
Kudos: 1

Re: L2TP server access problem

[ Edited ]

actually I'm not sure - what IP should I enter here (

 

Interface    IP Address                        S/L  Description                 
---------    ----------                        ---  -----------                 
eth0         192.168.1.1/24                    u/u                              
eth1         192.168.2.1/24                    A/D                              
eth2         -                                 u/u                              
lo           127.0.0.1/8                       u/u                              
pppoe0       213.141.***.***                   u/u                              

 

 

Ubiquiti Employee
Posts: 2,991
Registered: ‎02-04-2013
Kudos: 354
Solutions: 289

Re: L2TP server access problem

Replace 10.1.0.124 with the WAN IP(213.141.***.***), replace 10.1.0.1 with the default gateway IP("show ip route" can tell), and the client-ip-pool with a range like 192.168.3.10 - 192.168.3.19

Highlighted
New Member
Posts: 19
Registered: ‎05-07-2013
Kudos: 1

Re: L2TP server access problem

thanks!