Reply
New Member
Posts: 8
Registered: ‎12-23-2015
Accepted Solution

Firewall Issues: Cannot access IP/domains internally

I reconfiguring my EdgeRouter to gain ipv6 support using the wizard and have wiped out my working firewall/NAT rules. 

 

I'm running an http server and can access it via IP and domains from the outside world. Internally, I cannot hit the IP or domain. I get connection refused. Any help would be much appreciated.

 

firewall {
    all-ping enable
    broadcast-ping disable
    ipv6-name WANv6_IN {
        default-action drop
        description "WAN inbound traffic forwarded to LAN"
        enable-default-log
        rule 10 {
            action accept
            description "Allow established/related sessions"
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    ipv6-name WANv6_LOCAL {
        default-action drop
        description "WAN inbound traffic to the router"
        enable-default-log
        rule 10 {
            action accept
            description "Allow established/related sessions"
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
        rule 30 {
            action accept
            description "Allow IPv6 icmp"
            protocol ipv6-icmp
        }
        rule 40 {
            action accept
            description "allow dhcpv6"
            destination {
                port 546
            }
            protocol udp
            source {
                port 547
            }
        }
    }
    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 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 dhcp
        description Internet
        dhcpv6-pd {
            pd 0 {
                interface switch0 {
                    host-address ::1
                    prefix-id :1
                    service slaac
                }
                prefix-length /60
            }
            rapid-commit enable
        }
        duplex auto
        firewall {
            in {
                ipv6-name WANv6_IN
                name WAN_IN
            }
            local {
                ipv6-name WANv6_LOCAL
                name WAN_LOCAL
            }
        }
        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
        poe {
            output pthru
        }
        speed auto
    }
    loopback lo {
    }
    switch switch0 {
        address 192.168.1.1/24
        description Local
        mtu 1500
        switch-port {
            interface eth1 {
            }
            interface eth2 {
            }
            interface eth3 {
            }
            interface eth4 {
            }
            vlan-aware disable
        }
    }
}
port-forward {
    auto-firewall enable
    hairpin-nat enable
    lan-interface eth1
    rule 1 {
        description http
        forward-to {
            address 192.168.1.98
            port 80
        }
        original-port 80
        protocol tcp_udp
    }
    rule 2 {
        description https
        forward-to {
            address 192.168.1.98
            port 443
        }
        original-port 443
        protocol tcp_udp
    }
    rule 3 {
        description torrent
        forward-to {
            address 192.168.1.98
            port 16881
        }
        original-port 16881
        protocol tcp
    }
    rule 4 {
        description "torrent udp"
        forward-to {
            address 192.168.1.98
            port 6881
        }
        original-port 6881
        protocol udp
    }
    rule 5 {
        description DSM
        forward-to {
            address 192.168.1.98
            port 5001
        }
        original-port 5001
        protocol tcp_udp
    }
    rule 6 {
        description edgerouter
        forward-to {
            address 192.168.1.1
            port 1515
        }
        original-port 1515
        protocol tcp_udp
    }
    rule 7 {
        description ssh
        forward-to {
            address 192.168.1.98
            port 22
        }
        original-port 22
        protocol tcp_udp
    }
    wan-interface eth0
}
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
                }
                static-mapping gillphotos_nas {
                    ip-address 192.168.1.98
                    mac-address 00:11:32:45:b7:cd
                }
            }
        }
        use-dnsmasq disable
    }
    dns {
        forwarding {
            cache-size 150
            listen-on switch0
        }
    }
    gui {
        http-port 1514
        https-port 1515
        older-ciphers enable
    }
    nat {
        rule 1 {
            description "Forward 80 to Syn"
            destination {
                address 192.168.1.98
                port 80
            }
            inbound-interface eth1
            inside-address {
                address 192.168.1.98
                port 80
            }
            log disable
            protocol tcp
            type destination
        }
        rule 5010 {
            description "masquerade for WAN"
            outbound-interface eth0
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
}
system {
    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
}


/* 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-unms@1:ubnt-util@1:vrrp@1:webgui@1:webproxy@1:zone-policy@1" === */
/* Release version: v1.9.7+hotfix.4.5024279.171006.0255 */

Accepted Solutions
Veteran Member
Posts: 5,782
Registered: ‎01-04-2017
Kudos: 830
Solutions: 294

Re: Firewall Issues: Cannot access IP/domains internally


All Replies
Veteran Member
Posts: 5,782
Registered: ‎01-04-2017
Kudos: 830
Solutions: 294

Re: Firewall Issues: Cannot access IP/domains internally

New Member
Posts: 8
Registered: ‎12-23-2015

Re: Firewall Issues: Cannot access IP/domains internally

Thanks a bunch. Working perfect now.
Reply