Quantcast
Viewing all articles
Browse latest Browse all 20028

Block WAN IP

Hello Community

 

I've read a lot about firewall rules but it is still not working.

 

I'd like to block the ip ranges 155.133.82.1-155.133.82.254 (and to test it 213.162.68.0-213.162.68.254)

 

But i can still access all ports with my phone (carrier-nat-ip 213.162.68.29)

 

Could please someone look at my config and point out my mistake. my wan connection is on eth0

 

Thx for your help

 

-fipse

 

firewall {
    all-ping enable
    broadcast-ping disable
    group {
        address-group Block-IP {
            address 155.133.82.1-155.133.82.254
            address 213.162.68.0-213.162.68.254
            description ""
        }
    }
    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 1 {
            action drop
            description block
            destination {
                address 192.168.0.0/24
            }
            log disable
            protocol all
            source {
                group {
                    address-group Block-IP
                }
            }
            state {
                established enable
                invalid disable
                new enable
                related enable
            }
        }
        rule 3 {
            action accept
            state {
                established enable
                related enable
            }
        }
        rule 4 {
            action drop
            state {
                invalid enable
            }
        }
    }
    name WAN_LOCAL {
        default-action drop
        description "WAN to router"
        rule 10 {
            action accept
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action drop
            state {
                invalid enable
            }
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        address dhcp
        description UPC
        duplex auto
        firewall {
            in {
                name WAN_IN
            }
            local {
                name WAN_LOCAL
            }
        }
        speed auto
    }
    ethernet eth1 {
        address dhcp
        duplex auto
        speed auto
    }
    ethernet eth2 {
        duplex auto
        speed auto
    }
    ethernet eth3 {
        duplex auto
        speed auto
    }
    ethernet eth4 {
        address dhcp
        duplex auto
        speed auto
    }
    ethernet eth5 {
        duplex auto
        speed auto
    }
    ethernet eth6 {
        address 192.168.0.1/24
        description FiberLink
        duplex auto
        speed auto
    }
    ethernet eth7 {
        address 192.168.1.1/24
        duplex auto
        speed auto
    }
    loopback lo {
    }
}
port-forward {
    auto-firewall enable
    hairpin-nat enable
    lan-interface eth6
    rule 1 {
        description WEB
        forward-to {
            address 192.168.0.3
            port 80
        }
        original-port 80
        protocol tcp
    }
    rule 2 {
        description VPNTCP
        forward-to {
            address 192.168.0.3
            port 1723
        }
        original-port 1723
        protocol tcp
    }
    rule 3 {
        description VPNGRE
        forward-to {
            address 192.168.0.3
            port 47
        }
        original-port 47
        protocol tcp_udp
    }
    rule 4 {
        description vp2
        forward-to {
            address 192.168.0.3
            port 1701
        }
        original-port 1701
        protocol tcp
    }
    rule 5 {
        description vp1
        forward-to {
            address 192.168.0.3
            port 500
        }
        original-port 500
        protocol udp
    }
    rule 6 {
        description vp3
        forward-to {
            address 192.168.0.3
            port 443
        }
        original-port 443
        protocol tcp
    }
    rule 7 {
        description mailAlt
        forward-to {
            address 192.168.0.3
            port 25
        }
        original-port 2525
        protocol tcp_udp
    }
    rule 8 {
        description mail2
        forward-to {
            address 192.168.0.3
            port 110
        }
        original-port 110
        protocol tcp_udp
    }
    rule 9 {
        description iamp
        forward-to {
            address 192.168.0.3
            port 143
        }
        original-port 143
        protocol tcp_udp
    }
    rule 10 {
        description ts3_1
        forward-to {
            address 192.168.0.7
            port 9987
        }
        original-port 9987
        protocol udp
    }
    rule 11 {
        description ts3_2
        forward-to {
            address 192.168.0.7
            port 10011
        }
        original-port 10011
        protocol tcp
    }
    rule 12 {
        description ts3_3
        forward-to {
            address 192.168.0.7
            port 30033
        }
        original-port 30033
        protocol tcp
    }
    rule 13 {
        description steam
        forward-to {
            address 192.168.0.7
            port 27000-27015
        }
        original-port 27000-27015
        protocol tcp_udp
    }
    rule 14 {
        description mail
        forward-to {
            address 192.168.0.3
            port 25
        }
        original-port 25
        protocol tcp_udp
    }
    rule 15 {
        description steam2
        forward-to {
            address 192.168.0.7
            port 1200
        }
        original-port 1200
        protocol udp
    }
    rule 16 {
        description steam3
        forward-to {
            address 192.168.0.7
            port 27020
        }
        original-port 27020
        protocol tcp
    }
    wan-interface eth0
}
service {
    dhcp-server {
        disabled false
        hostfile-update disable
        shared-network-name LAN {
            authoritative disable
            subnet 192.168.0.0/24 {
                default-router 192.168.0.1
                dns-server 192.168.0.1
                lease 86400
                start 192.168.0.100 {
                    stop 192.168.0.200
                }
                static-mapping NAS {
                    ip-address 192.168.0.32
                    mac-address 78:54:2E:23:14:07
                }
                static-mapping Phil-PC {
                    ip-address 192.168.0.104
                    mac-address 14:da:e9:0e:7d:eb
                }
                static-mapping SERVER {
                    ip-address 192.168.0.7
                    mac-address D0:50:99:4B:77:7C
                }
                static-mapping ServerMonitor {
                    ip-address 192.168.0.3
                    mac-address 14:cc:20:05:d6:51
                }
                static-mapping Switch {
                    ip-address 192.168.0.2
                    mac-address 10:fe:ED:28:A6:B4
                }
                static-mapping ubntWLAN {
                    ip-address 192.168.0.4
                    mac-address dc:9f:db:01:8f:f6
                }
            }
        }
        shared-network-name LAN2 {
            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.2 {
                    stop 192.168.1.30
                }
            }
        }
    }
    dns {
        dynamic {
            interface eth0 {
                service dyndns {
                    host-name 
                    login 
                    password 
                    server dynupdate.no-ip.com
                }
                web dyndns
            }
            interface eth6 {
                service dyndns {
                    host-name 
                    login 
                    password 
                    server dynupdate.no-ip.com
                }
                web dyndns
            }
        }
        forwarding {
            cache-size 150
            listen-on eth6
            listen-on eth7
        }
    }
    gui {
        https-port 443
    }
    nat {
        rule 5010 {
            log disable
            outbound-interface eth0
            protocol all
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
}
system {
    conntrack {
        expect-table-size 4096
        hash-size 4096
        table-size 32768
        tcp {
            half-open-connections 512
            loose enable
            max-retrans 3
        }
    }
    host-name Router
    login {
        user r00t {
            authentication {
                encrypted-password 
                plaintext-password ""
            }
            full-name "admin"
            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 {
        }
    }
    package {
        repository wheezy {
            components "main contrib non-free"
            distribution wheezy
            password ""
            url http://http.us.debian.org/debian
            username ""
        }
        repository wheezy-security {
            components main
            distribution wheezy/updates
            password ""
            url http://security.debian.org
            username ""
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone Europe/Vienna
    traffic-analysis {
        dpi enable
        export enable
    }
}


/* 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.1614 */

Viewing all articles
Browse latest Browse all 20028

Trending Articles



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