Quantcast
Viewing all articles
Browse latest Browse all 20028

IPsec L2TP issues

Hey guys,


I have been working on this for quite a few days and I am all out of ideas. I have followed Ubiquiti's guides and some from other websites. I have been trying to use the vpn logs. I have also looked through the Ubiquiti community forms (as well as the subreddit). I even contacted ubiquiti about this and they said to ask the form. So here I am lol.


I have tried using android's built in VPN and windows 10 VPN. I can see in the logs they are making connection but they always turn out unsuccessful. I will paste my VPN configuration below. Also, is there any way to clear the VPN log? I have a mess of logs and it is hard now to tell what is what.


Maybe there is something you guys will see. Your time is highly appreciated.


-Dave

 

 

vpn {
    ipsec {
        auto-firewall-nat-exclude disable
        ipsec-interfaces {
            interface eth0
        }
        nat-networks {
            allowed-network 0.0.0.0/0 {
            }
            allowed-network 192.168.1.0/24 {
            }
        }
        nat-traversal enable
    }
    l2tp {
        remote-access {
            authentication {
                local-users {
                    username David {
                        password 'sanitized password'
                    }
                }
                mode local
            }
            client-ip-pool {
                start 192.168.1.241
                stop 192.168.1.253
            }
            dns-servers {
                server-1 192.168.1.1
            }
            ipsec-settings {
                authentication {
                    mode pre-shared-secret
                    pre-shared-secret 'sanitizedsecret'
                }
                ike-lifetime 3600
            }
            mtu 1024
            outside-address ***.***.***.***
            outside-nexthop ***.***.***.1
        }

 

Here is a copy of my full config:

 

firewall {
    all-ping enable
    broadcast-ping disable
    group {
    }
    ipv6-receive-redirects disable
    ipv6-src-route disable
    ip-src-route disable
    log-martians enable
    name WAN_IN {
        default-action drop
        description "WAN to internal"
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    name WAN_LOCAL {
        default-action drop
        description "WAN to router"
        rule 3 {
            action accept
            description "ALLOW IKE FOR VPN"
            destination {
                port 400
            }
            log disable
            protocol udp
        }
        rule 4 {
            action accept
            description "ALLOW L2TP FOR VPN"
            destination {
                port 1701
            }
            log disable
            protocol udp
        }
        rule 5 {
            action accept
            description "ALLOW ESP FOR VPN"
            log disable
            protocol esp
        }
        rule 6 {
            action accept
            description "ALLOW NAT-T FOR VPN"
            destination {
                port 4500
            }
            log disable
            protocol udp
        }
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        address **.**.**.**/23
        description Internet
        duplex auto
        firewall {
            in {
                name WAN_IN
            }
            local {
                name WAN_LOCAL
            }
        }
        speed auto
    }
    ethernet eth1 {
        address 192.168.1.1/24
        description Local
        duplex auto
        speed auto
    }
    ethernet eth2 {
        address 192.168.2.1/24
        description "Local 2"
        duplex auto
        speed auto
    }
    loopback lo {
    }
}
port-forward {
    auto-firewall enable
    hairpin-nat enable
    lan-interface eth1
    rule 1 {
        description DVR
        forward-to {
            address 192.168.1.2
            port 18004
        }
        original-port 18004
        protocol tcp_udp
    }
    rule 2 {
        description "DVR 2"
        forward-to {
            address 192.168.1.2
            port 9000
        }
        original-port 9000
        protocol tcp_udp
    }
    rule 3 {
        description "DVR 3"
        forward-to {
            address 192.168.1.2
            port 80
        }
        original-port 80
        protocol tcp_udp
    }
    wan-interface eth0
}
service {
    dhcp-server {
        disabled false
        hostfile-update disable
        shared-network-name LAN1 {
            authoritative disable
            subnet 192.168.1.0/24 {
                default-router 192.168.1.1
                dns-server 192.168.1.1
                lease 86400
                start 192.168.1.38 {
                    stop 192.168.1.240
                }
            }
        }
        shared-network-name LAN2 {
            authoritative disable
            subnet 192.168.2.0/24 {
                default-router 192.168.2.1
                dns-server 192.168.2.1
                lease 86400
                start 192.168.2.38 {
                    stop 192.168.2.243
                }
            }
        }
    }
    dns {
        forwarding {
            cache-size 150
            listen-on eth1
            listen-on eth2
        }
    }
    gui {
        https-port 443
    }
    nat {
        rule 5010 {
            description "masquerade for WAN"
            outbound-interface eth0
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
}
system {
    gateway-address **.**.**.1
    host-name ubnt
    login {
        user admin {
            authentication {
                encrypted-password *****
            }
            level admin
        }
    }
    name-server ***.***.***.***
    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 America/New_York
}
vpn {
    ipsec {
        auto-firewall-nat-exclude disable
        ipsec-interfaces {
            interface eth0
        }
        nat-networks {
            allowed-network 0.0.0.0/0 {
            }
            allowed-network 192.168.1.0/24 {
            }
        }
        nat-traversal enable
    }
    l2tp {
        remote-access {
            authentication {
                local-users {
                    username David {
                        password 'sanitized password'
                    }
                }
                mode local
            }
            client-ip-pool {
                start 192.168.1.241
                stop 192.168.1.253
            }
            dns-servers {
                server-1 192.168.1.1
            }
            ipsec-settings {
                authentication {
                    mode pre-shared-secret
                    pre-shared-secret 'sanitizedsecret'
                }
                ike-lifetime 3600
            }
            mtu 1024
            outside-address ***.***.***.***
            outside-nexthop ***.***.***.1
        }
    }
}


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

Viewing all articles
Browse latest Browse all 20028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>