summaryrefslogtreecommitdiff
path: root/docs/configuration/zonepolicy
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-27 23:50:27 +0100
committerGitHub <noreply@github.com>2020-12-27 23:50:27 +0100
commit82a1890deed6a4cb569044049e9866ce85efcc9f (patch)
treedb2ec816dfdcfcc6f951e99566433d412240bb80 /docs/configuration/zonepolicy
parent3caeaac25e54a2af9c2c4c3df742e15a76336ecf (diff)
parent8d62b06b04283e1688584592b7ecc8144f8e341c (diff)
downloadvyos-documentation-82a1890deed6a4cb569044049e9866ce85efcc9f.tar.gz
vyos-documentation-82a1890deed6a4cb569044049e9866ce85efcc9f.zip
Merge pull request #407 from srividya0208/zone-policy
zone-policy: page information is added
Diffstat (limited to 'docs/configuration/zonepolicy')
-rw-r--r--docs/configuration/zonepolicy/index.rst65
1 files changed, 64 insertions, 1 deletions
diff --git a/docs/configuration/zonepolicy/index.rst b/docs/configuration/zonepolicy/index.rst
index 31784dc3..8fe18778 100644
--- a/docs/configuration/zonepolicy/index.rst
+++ b/docs/configuration/zonepolicy/index.rst
@@ -1,3 +1,4 @@
+
###########
Zone Policy
###########
@@ -5,4 +6,66 @@ Zone Policy
.. toctree::
:maxdepth: 1
- :includehidden: \ No newline at end of file
+ :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/latest/configexamples/zone-policy.html
+
+.. start_vyoslinter