New Member
Posts: 1
Registered: ‎03-07-2019

Remotely accessing web server points me to my edge router

[ Edited ]

I am trying to remotely access my UNMS server (192.168.1.39) through my WAN IP. But currently it is pointing me to my edge router (192.168.1.1).

I have attached my config.

 

firewall {                                                                      
    all-ping enable                                                             
    broadcast-ping disable                                                      
    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 accept                                                       
            destination {                                                       
                address 192.168.1.39                                            
                port 443                                                        
            }
            log disable
            protocol tcp
        }
        rule 30 {
            action accept
            destination {
                address 192.168.1.39
                port 80
            }
            log disable
            protocol tcp
        }
        rule 40 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    name WAN_LOCAL {
        default-action drop
        description "WAN to router"
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 40 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    options {
        mss-clamp {
            mss 1412
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        description "Internet (PPPoE)"
        duplex auto
        pppoe 0 {
            default-route auto
            firewall {
                in {
                }
                local {
                    name WAN_LOCAL
                }
                out {
                }
            }
            mtu 1492
            name-server auto
            password ****************
            user-id sdona499
        }
        speed auto
    }
    ethernet eth1 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth2 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth3 {
        description Local
        duplex auto
        speed auto
    }
    ethernet eth4 {
        description Local
        duplex auto
        speed auto
    }
    loopback lo {
    }
    switch switch0 {
        address 192.168.1.1/24
        description Local
        switch-port {
            interface eth1 {
            }
            interface eth2 {
            }
            interface eth3 {
            }
            interface eth4 {
            }
        }
    }
}
service {
    dhcp-server {
        disabled false
        hostfile-update disable
        shared-network-name LAN {
            authoritative enable
            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.243
                }
            }
        }
    }
    dns {
        forwarding {
            cache-size 150
            listen-on switch0
        }
    }
    gui {
        https-port 443
    }
    nat {
        rule 1 {
            description "UNMS HTTP"
            destination {
                address 193.116.95.95
                port 80
            }
            inbound-interface eth0
            inside-address {
                address 192.168.1.39
                port 80
            }
            log disable
            protocol tcp
            type destination
        }
        rule 2 {
            description "UNMS HTTPS"
            destination {
                address 193.116.95.95
                port 443
            }
            inbound-interface eth0
            inside-address {
                address 192.168.1.39
                port 443
            }
            log disable
            protocol tcp
            type destination
        }
        rule 3 {
            description Hairpin443
            destination {
                address 193.116.95.95
                port 443
            }
            inbound-interface eth1
            inside-address {
                address 192.168.1.39
                port 443
            }
            log disable
            protocol tcp
            type destination
        }
        rule 4 {
            description Hairpin80
            destination {
                address 193.116.95.95
                port 80
            }
            inbound-interface eth1
            inside-address {
                address 192.168.1.39
                port 80
            }
            log disable
            protocol tcp
            type destination
        }
        rule 5001 {
            description Hairpin443
            destination {
                address 192.168.1.39
                port 443
            }
            log disable
            outbound-interface eth1
            outside-address {
            }
            protocol tcp
            source {
                address 192.168.1.0/24
            }
            type masquerade
        }
        rule 5002 {
            description Hairpin80
            destination {
                address 192.168.1.39
                port 80
            }
            log disable
            outbound-interface eth1
            outside-address {
            }
            protocol tcp
            source {
                address 192.168.1.0/24
            }
            type masquerade
        }
        rule 5003 {
            description "masquerade for WAN"
            outbound-interface pppoe0
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
}
system {
    host-name ubnt
    login {
        user ubnt {
            authentication {
                encrypted-password ****************
            }
            level admin
        }
    }
    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 UTC
SuperUser
Posts: 8,576
Registered: ‎01-05-2012
Kudos: 2261
Solutions: 1144

Re: Remotely accessing web server points me to my edge router

In the NAT rules 1 and 2, inbound-interface should be pppoe0, not eth0.

Cheers,

jonatha

Established Member
Posts: 1,019
Registered: ‎09-24-2017
Kudos: 217
Solutions: 83

Re: Remotely accessing web server points me to my edge router

You also don't have the WAN_IN firewall rules applied to your PPPoE interface. This means that there is no firewall protecting your LAN.