blob: ec5cb301e793a700ab240e2962d88903c21f9b96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
###########
Zone Policy
###########
.. toctree::
:maxdepth: 1
:includehidden:
In zone-based policy, interfaces are assigned to zones, and inspection policy is applied to traffic moving between the zones and acted on according to firewall rules.
A Zone is a group of interfaces that have similar functions or features. It establishes the security borders of a network.
A zone defines a boundary where traffic is subjected to policy restrictions as it crosses to another region of a network.
Key Points:
* A zone must be configured before an interface is assigned to it and an interface can be assigned to only a single zone.
* All traffic to and from an interface within a zone is permitted.
* All traffic between zones is affected by existing policies
* Traffic cannot flow between zone member interface and any interface that is not a zone member.
* You need 2 separate firewalls to define traffic: one for each direction.
Example: LAN Network is given SSH access to VyOS box.
Firewall rules:
.. code-block:: none
set firewall name lan-local default-action 'drop'
set firewall name lan-local rule 1 action 'accept'
set firewall name lan-local rule 1 state established 'enable'
set firewall name lan-local rule 1 state related 'enable'
set firewall name lan-local rule 2 action 'drop'
set firewall name lan-local rule 2 state invalid 'enable'
set firewall name lan-local rule 2 log enable
set firewall name lan-local rule 100 action 'accept'
set firewall name lan-local rule 100 destination port '22'
set firewall name lan-local rule 100 log 'enable'
set firewall name lan-local rule 100 protocol 'tcp'
set firewall name local-lan default-action 'drop'
set firewall name local-lan rule 1 action 'accept'
set firewall name local-lan rule 1 state established 'enable'
set firewall name local-lan rule 1 state related 'enable'
set firewall name local-lan rule 2 action 'drop'
set firewall name local-lan rule 2 state invalid 'enable'
set firewall name local-lan rule 2 log enable
set firewall name local-lan rule 100 action 'accept'
set firewall name local-lan rule 100 destination address '192.168.0.0/24'
set firewall name local-lan rule 100 log 'enable'
set firewall name local-lan rule 100 protocol 'tcp'
Zone-policy Config:
.. code-block:: none
set zone-policy zone lan default-action 'drop'
set zone-policy zone lan description 'Local Area Network'
set zone-policy zone lan interface 'eth2'
set zone-policy zone lan from local firewall name 'lan-local'
set zone-policy zone local default-action 'drop'
set zone-policy zone local description 'system-defined zone'
set zone-policy zone local from lan firewall name 'local-lan'
set zone-policy zone local local-zone
A detailed zone-based policy example is written in the
Configuration-Blueprints_ section.
.. stop_vyoslinter
.. _Configuration-Blueprints: https://docs.vyos.io/en/equuleus/configexamples/zone-policy.html
.. start_vyoslinter
|