Sitat av
thomas
Kan du legge ut hele configen din ?
Her er hele min config. Jeg har heller ikke opplevd det nødvendig å bruke noen spesielle FW regler.
Kode
firewall {
all-ping enable
broadcast-ping disable
group {
network-group GUEST_ZONE {
description ""
network 192.168.10.0/24
}
network-group HUS_ZONE {
description ""
network 10.0.4.0/24
}
network-group INTERNAL_ZONE {
description ""
network 10.0.1.0/24
network 10.0.4.0/24
network 10.0.6.0/24
}
network-group SERVER_ZONE {
description ""
network 10.0.1.0/24
}
network-group TV_WAN {
description ""
network 172.21.0.0/16
}
network-group vtun0_OpenVPN {
description ""
network 172.16.1.0/24
}
}
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name GUEST_IN {
default-action accept
description ""
rule 1 {
action accept
description "Accept Established/Related"
log disable
protocol all
state {
established enable
invalid disable
new disable
related enable
}
}
rule 2 {
action drop
description "Drop INTERNAL_NETWORKS"
destination {
group {
network-group INTERNAL_ZONE
}
}
log enable
protocol all
}
rule 3 {
action drop
description "DROP VPN_NETWORK"
destination {
group {
network-group vtun0_OpenVPN
}
}
log enable
protocol all
}
}
name GUEST_LOCAL {
default-action drop
description ""
rule 1 {
action accept
description ACCEPT_DNS
destination {
port 53
}
log disable
protocol tcp_udp
}
rule 2 {
action accept
description ACCEPT_DHCP
destination {
port 67
}
log disable
protocol udp
}
}
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
}
}
rule 30 {
action accept
description OpenVPN
destination {
port 1194
}
protocol udp
}
}
receive-redirects disable
send-redirects enable
source-validation disable
syn-cookies enable
}
interfaces {
ethernet eth0 {
description GAR-1-AP-01
duplex auto
poe {
output 24v
watchdog {
address 10.0.1.102
failure-count 3
interval 15
off-delay 5
start-delay 300
}
}
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
}
ethernet eth5 {
duplex auto
mac e4:18:*:*:*:*
speed auto
vif 100 {
description ALTIBOX_CONFIG
mtu 1500
}
vif 101 {
address dhcp
description TV_WAN
dhcp-options {
default-route no-update
default-route-distance 210
name-server update
}
}
vif 102 {
address dhcp
description WAN
firewall {
in {
name WAN_IN
}
local {
name WAN_LOCAL
}
}
}
}
loopback lo {
}
openvpn vtun0 {
description "OpenVPN Server"
encryption ***
hash ***
mode server
tls {
ca-cert-file /config/auth/cacert.pem
cert-file /config/auth/server.pem
dh-file /config/auth/dh.pem
key-file /config/auth/server-no-pass.key
}
}
openvpn vtun1 {
description "OpenVPN s-2-s"
disable
encryption *
hash *
mode site-to-site
protocol udp
remote-address *.*.*.*
}
switch switch0 {
description Local
mtu 1500
switch-port {
interface eth0 {
vlan {
pvid 1
}
}
interface eth1 {
vlan {
pvid 1
vid 4
vid 5
vid 10
}
}
interface eth2 {
vlan {
pvid 1
vid 4
vid 5
vid 10
}
}
interface eth3 {
vlan {
pvid 1
vid 4
vid 5
vid 10
}
}
interface eth4 {
vlan {
pvid 1
vid 4
vid 5
vid 10
}
}
vlan-aware enable
}
vif 1 {
address 10.0.1.1/24
description SERVER_LAN
mtu 1500
}
vif 4 {
address 10.0.4.1/24
description HUS_LAN
mtu 1500
}
vif 5 {
address 192.168.10.1/24
description GUEST_LAN
firewall {
in {
name GUEST_IN
}
local {
name GUEST_LOCAL
}
}
mtu 1500
}
vif 6 {
address 10.0.3.1/24
description VSAN_LAN
mtu 1500
}
}
}
port-forward {
auto-firewall enable
hairpin-nat enable
lan-interface switch0.1
lan-interface switch0.4
lan-interface switch0.5
rule 1 {
description ""
forward-to {
address 10.0.1.59
}
original-port *,*
protocol tcp
}
rule 2 {
description ""
forward-to {
address 10.0.1.6
}
original-port *
protocol tcp
}
wan-interface eth5.102
}
protocols {
igmp-proxy {
interface eth5.101 {
alt-subnet 0.0.0.0/0
role upstream
threshold 1
}
interface switch0.1 {
role disabled
}
interface switch0.4 {
alt-subnet 0.0.0.0/0
role downstream
threshold 1
}
interface switch0.5 {
role disabled
}
}
static {
route 172.21.0.0/16 {
next-hop 10.164.130.1 {
}
}
}
}
service {
dhcp-relay {
interface switch0.1
interface switch0.4
interface switch0.5
server 10.0.1.35
}
dhcp-server {
disabled false
hostfile-update disable
shared-network-name VSAN {
authoritative disable
subnet 10.0.3.0/24 {
default-router 10.0.3.1
lease 86400
start 10.0.3.5 {
stop 10.0.3.254
}
}
}
shared-network-name vMotion {
authoritative disable
subnet 10.0.5.0/24 {
default-router 10.0.5.1
lease 86400
start 10.0.5.2 {
stop 10.0.5.254
}
}
}
static-arp disable
use-dnsmasq disable
}
dns {
forwarding {
cache-size 1000
listen-on switch0.1
listen-on switch0.4
listen-on switch0.5
listen-on vtun0
}
}
gui {
http-port 80
https-port 443
older-ciphers enable
}
nat {
rule 5010 {
description "masquerade for WAN"
outbound-interface eth5.102
type masquerade
}
rule 5011 {
description "masquerade for TV_WAN"
destination {
group {
network-group TV_WAN
}
}
log enable
outbound-interface eth5.101
protocol all
type masquerade
}
}
ssh {
port 22
protocol-version v2
}
unms {
disable
}
}
system {
host-name fw.*.*
login {
user *** {
authentication {
***
}
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 {
}
}
offload {
hwnat enable
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone Europe/Oslo
traffic-analysis {
dpi enable
export enable
}
}
traffic-control {
advanced-queue {
root {
queue 1023 {
attach-to global
bandwidth 1000mbit
description UBNT-BQ
}
}
}
}