| ofs | hex dump | ascii |
|---|
| 0000 | de 12 04 95 00 00 00 00 55 00 00 00 1c 00 00 00 c4 02 00 00 71 00 00 00 6c 05 00 00 00 00 00 00 | ........U...........q...l....... |
| 0020 | 30 07 00 00 6a 00 00 00 31 07 00 00 93 01 00 00 9c 07 00 00 46 00 00 00 30 09 00 00 34 00 00 00 | 0...j...1...........F...0...4... |
| 0040 | 77 09 00 00 3d 00 00 00 ac 09 00 00 5f 00 00 00 ea 09 00 00 ff 00 00 00 4a 0a 00 00 56 00 00 00 | w...=......._...........J...V... |
| 0060 | 4a 0b 00 00 18 00 00 00 a1 0b 00 00 17 00 00 00 ba 0b 00 00 c1 00 00 00 d2 0b 00 00 84 00 00 00 | J............................... |
| 0080 | 94 0c 00 00 1c 00 00 00 19 0d 00 00 53 00 00 00 36 0d 00 00 16 00 00 00 8a 0d 00 00 d6 00 00 00 | ............S...6............... |
| 00a0 | a1 0d 00 00 da 00 00 00 78 0e 00 00 0f 00 00 00 53 0f 00 00 44 00 00 00 63 0f 00 00 12 00 00 00 | ........x.......S...D...c....... |
| 00c0 | a8 0f 00 00 19 00 00 00 bb 0f 00 00 23 00 00 00 d5 0f 00 00 a0 00 00 00 f9 0f 00 00 13 01 00 00 | ............#................... |
| 00e0 | 9a 10 00 00 12 01 00 00 ae 11 00 00 89 00 00 00 c1 12 00 00 8d 00 00 00 4b 13 00 00 31 00 00 00 | ........................K...1... |
| 0100 | d9 13 00 00 14 00 00 00 0b 14 00 00 22 01 00 00 20 14 00 00 95 00 00 00 43 15 00 00 b7 00 00 00 | ............"...........C....... |
| 0120 | d9 15 00 00 f3 00 00 00 91 16 00 00 7c 00 00 00 85 17 00 00 08 00 00 00 02 18 00 00 c8 00 00 00 | ............|................... |
| 0140 | 0b 18 00 00 09 00 00 00 d4 18 00 00 cd 00 00 00 de 18 00 00 99 00 00 00 ac 19 00 00 27 01 00 00 | ............................'... |
| 0160 | 46 1a 00 00 25 01 00 00 6e 1b 00 00 17 00 00 00 94 1c 00 00 3e 00 00 00 ac 1c 00 00 03 00 00 00 | F...%...n...........>........... |
| 0180 | eb 1c 00 00 bc 00 00 00 ef 1c 00 00 66 00 00 00 ac 1d 00 00 42 00 00 00 13 1e 00 00 16 00 00 00 | ............f.......B........... |
| 01a0 | 56 1e 00 00 1f 00 00 00 6d 1e 00 00 1d 00 00 00 8d 1e 00 00 18 00 00 00 ab 1e 00 00 18 00 00 00 | V.......m....................... |
| 01c0 | c4 1e 00 00 0b 00 00 00 dd 1e 00 00 29 00 00 00 e9 1e 00 00 27 00 00 00 13 1f 00 00 0e 00 00 00 | ............).......'........... |
| 01e0 | 3b 1f 00 00 2b 00 00 00 4a 1f 00 00 5b 00 00 00 76 1f 00 00 5d 00 00 00 d2 1f 00 00 47 00 00 00 | ;...+...J...[...v...].......G... |
| 0200 | 30 20 00 00 45 00 00 00 78 20 00 00 47 00 00 00 be 20 00 00 08 01 00 00 06 21 00 00 ac 00 00 00 | 0...E...x...G............!...... |
| 0220 | 0f 22 00 00 94 00 00 00 bc 22 00 00 89 00 00 00 51 23 00 00 6d 00 00 00 db 23 00 00 f6 00 00 00 | ."......."......Q#..m....#...... |
| 0240 | 49 24 00 00 f2 00 00 00 40 25 00 00 87 00 00 00 33 26 00 00 17 01 00 00 bb 26 00 00 72 01 00 00 | I$......@%......3&.......&..r... |
| 0260 | d3 27 00 00 72 01 00 00 46 29 00 00 91 00 00 00 b9 2a 00 00 43 01 00 00 4b 2b 00 00 9c 00 00 00 | .'..r...F).......*..C...K+...... |
| 0280 | 8f 2c 00 00 02 01 00 00 2c 2d 00 00 9b 00 00 00 2f 2e 00 00 99 00 00 00 cb 2e 00 00 61 00 00 00 | .,......,-....../...........a... |
| 02a0 | 65 2f 00 00 64 00 00 00 c7 2f 00 00 60 00 00 00 2c 30 00 00 5c 00 00 00 8d 30 00 00 5a 00 00 00 | e/..d..../..`...,0..\....0..Z... |
| 02c0 | ea 30 00 00 da 00 00 00 45 31 00 00 6a 00 00 00 20 32 00 00 93 01 00 00 8b 32 00 00 46 00 00 00 | .0......E1..j....2.......2..F... |
| 02e0 | 1f 34 00 00 34 00 00 00 66 34 00 00 3d 00 00 00 9b 34 00 00 5f 00 00 00 d9 34 00 00 ff 00 00 00 | .4..4...f4..=....4.._....4...... |
| 0300 | 39 35 00 00 56 00 00 00 39 36 00 00 18 00 00 00 90 36 00 00 17 00 00 00 a9 36 00 00 c1 00 00 00 | 95..V...96.......6.......6...... |
| 0320 | c1 36 00 00 84 00 00 00 83 37 00 00 1c 00 00 00 08 38 00 00 53 00 00 00 25 38 00 00 16 00 00 00 | .6.......7.......8..S...%8...... |
| 0340 | 79 38 00 00 d6 00 00 00 90 38 00 00 da 00 00 00 67 39 00 00 0f 00 00 00 42 3a 00 00 44 00 00 00 | y8.......8......g9......B:..D... |
| 0360 | 52 3a 00 00 12 00 00 00 97 3a 00 00 19 00 00 00 aa 3a 00 00 23 00 00 00 c4 3a 00 00 a0 00 00 00 | R:.......:.......:..#....:...... |
| 0380 | e8 3a 00 00 13 01 00 00 89 3b 00 00 12 01 00 00 9d 3c 00 00 89 00 00 00 b0 3d 00 00 8d 00 00 00 | .:.......;.......<.......=...... |
| 03a0 | 3a 3e 00 00 31 00 00 00 c8 3e 00 00 14 00 00 00 fa 3e 00 00 22 01 00 00 0f 3f 00 00 95 00 00 00 | :>..1....>.......>.."....?...... |
| 03c0 | 32 40 00 00 b7 00 00 00 c8 40 00 00 f3 00 00 00 80 41 00 00 7c 00 00 00 74 42 00 00 08 00 00 00 | 2@.......@.......A..|...tB...... |
| 03e0 | f1 42 00 00 c8 00 00 00 fa 42 00 00 09 00 00 00 c3 43 00 00 cd 00 00 00 cd 43 00 00 99 00 00 00 | .B.......B.......C.......C...... |
| 0400 | 9b 44 00 00 27 01 00 00 35 45 00 00 25 01 00 00 5d 46 00 00 17 00 00 00 83 47 00 00 3e 00 00 00 | .D..'...5E..%...]F.......G..>... |
| 0420 | 9b 47 00 00 03 00 00 00 da 47 00 00 bc 00 00 00 de 47 00 00 66 00 00 00 9b 48 00 00 42 00 00 00 | .G.......G.......G..f....H..B... |
| 0440 | 02 49 00 00 16 00 00 00 45 49 00 00 1f 00 00 00 5c 49 00 00 1d 00 00 00 7c 49 00 00 18 00 00 00 | .I......EI......\I......|I...... |
| 0460 | 9a 49 00 00 18 00 00 00 b3 49 00 00 0b 00 00 00 cc 49 00 00 29 00 00 00 d8 49 00 00 27 00 00 00 | .I.......I.......I..)....I..'... |
| 0480 | 02 4a 00 00 0e 00 00 00 2a 4a 00 00 2b 00 00 00 39 4a 00 00 5b 00 00 00 65 4a 00 00 5d 00 00 00 | .J......*J..+...9J..[...eJ..]... |
| 04a0 | c1 4a 00 00 47 00 00 00 1f 4b 00 00 45 00 00 00 67 4b 00 00 47 00 00 00 ad 4b 00 00 08 01 00 00 | .J..G....K..E...gK..G....K...... |
| 04c0 | f5 4b 00 00 ac 00 00 00 fe 4c 00 00 94 00 00 00 ab 4d 00 00 89 00 00 00 40 4e 00 00 6d 00 00 00 | .K.......L.......M......@N..m... |
| 04e0 | ca 4e 00 00 f6 00 00 00 38 4f 00 00 f2 00 00 00 2f 50 00 00 87 00 00 00 22 51 00 00 17 01 00 00 | .N......8O....../P......"Q...... |
| 0500 | aa 51 00 00 72 01 00 00 c2 52 00 00 72 01 00 00 35 54 00 00 91 00 00 00 a8 55 00 00 43 01 00 00 | .Q..r....R..r...5T.......U..C... |
| 0520 | 3a 56 00 00 9c 00 00 00 7e 57 00 00 02 01 00 00 1b 58 00 00 9b 00 00 00 1e 59 00 00 99 00 00 00 | :V......~W.......X.......Y...... |
| 0540 | ba 59 00 00 61 00 00 00 54 5a 00 00 64 00 00 00 b6 5a 00 00 60 00 00 00 1b 5b 00 00 5c 00 00 00 | .Y..a...TZ..d....Z..`....[..\... |
| 0560 | 7c 5b 00 00 5a 00 00 00 d9 5b 00 00 01 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 | |[..Z....[..............@....... |
| 0580 | 05 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 08 00 00 00 43 00 00 00 07 00 00 00 | ........................C....... |
| 05a0 | 45 00 00 00 25 00 00 00 53 00 00 00 00 00 00 00 15 00 00 00 35 00 00 00 1e 00 00 00 3a 00 00 00 | E...%...S...........5.......:... |
| 05c0 | 00 00 00 00 54 00 00 00 39 00 00 00 20 00 00 00 3e 00 00 00 41 00 00 00 0b 00 00 00 4c 00 00 00 | ....T...9.......>...A.......L... |
| 05e0 | 00 00 00 00 36 00 00 00 49 00 00 00 42 00 00 00 00 00 00 00 00 00 00 00 44 00 00 00 3d 00 00 00 | ....6...I...B...........D...=... |
| 0600 | 4d 00 00 00 02 00 00 00 37 00 00 00 18 00 00 00 52 00 00 00 00 00 00 00 4a 00 00 00 29 00 00 00 | M.......7.......R.......J...)... |
| 0620 | 00 00 00 00 00 00 00 00 1f 00 00 00 34 00 00 00 2f 00 00 00 46 00 00 00 33 00 00 00 0f 00 00 00 | ............4.../...F...3....... |
| 0640 | 00 00 00 00 3b 00 00 00 32 00 00 00 23 00 00 00 13 00 00 00 28 00 00 00 17 00 00 00 4f 00 00 00 | ....;...2...#.......(.......O... |
| 0660 | 4b 00 00 00 00 00 00 00 24 00 00 00 0d 00 00 00 0c 00 00 00 48 00 00 00 00 00 00 00 00 00 00 00 | K.......$...........H........... |
| 0680 | 51 00 00 00 2a 00 00 00 3f 00 00 00 4e 00 00 00 00 00 00 00 2b 00 00 00 30 00 00 00 00 00 00 00 | Q...*...?...N.......+...0....... |
| 06a0 | 10 00 00 00 1d 00 00 00 22 00 00 00 26 00 00 00 00 00 00 00 55 00 00 00 04 00 00 00 00 00 00 00 | ........"...&.......U........... |
| 06c0 | 06 00 00 00 2d 00 00 00 21 00 00 00 00 00 00 00 1b 00 00 00 0e 00 00 00 14 00 00 00 38 00 00 00 | ....-...!...................8... |
| 06e0 | 12 00 00 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 00 00 3c 00 00 00 0a 00 00 00 31 00 00 00 | ....................<.......1... |
| 0700 | 16 00 00 00 19 00 00 00 2e 00 00 00 1c 00 00 00 47 00 00 00 00 00 00 00 27 00 00 00 1a 00 00 00 | ................G.......'....... |
| 0720 | 00 00 00 00 2c 00 00 00 50 00 00 00 11 00 00 00 00 41 20 64 65 66 61 75 6c 74 20 61 63 74 69 6f | ....,...P........A.default.actio |
| 0740 | 6e 20 6f 66 20 60 60 72 65 74 75 72 6e 60 60 2c 20 77 68 69 63 68 20 72 65 74 75 72 6e 73 20 74 | n.of.``return``,.which.returns.t |
| 0760 | 68 65 20 70 61 63 6b 65 74 20 62 61 63 6b 20 74 6f 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 63 | he.packet.back.to.the.original.c |
| 0780 | 68 61 69 6e 20 69 66 20 6e 6f 20 61 63 74 69 6f 6e 20 69 73 20 74 61 6b 65 6e 2e 00 41 20 6e 65 | hain.if.no.action.is.taken..A.ne |
| 07a0 | 77 20 66 69 72 65 77 61 6c 6c 20 73 74 72 75 63 74 75 72 65 e2 80 94 77 68 69 63 68 20 75 73 65 | w.firewall.structure...which.use |
| 07c0 | 73 20 74 68 65 20 60 60 6e 66 74 61 62 6c 65 73 60 60 20 62 61 63 6b 65 6e 64 2c 20 72 61 74 68 | s.the.``nftables``.backend,.rath |
| 07e0 | 65 72 20 74 68 61 6e 20 60 60 69 70 74 61 62 6c 65 73 60 60 e2 80 94 69 73 20 61 76 61 69 6c 61 | er.than.``iptables``...is.availa |
| 0800 | 62 6c 65 20 6f 6e 20 61 6c 6c 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 73 20 73 74 61 72 74 69 6e | ble.on.all.installations.startin |
| 0820 | 67 20 66 72 6f 6d 20 56 79 4f 53 20 60 60 31 2e 34 2d 72 6f 6c 6c 69 6e 67 2d 32 30 32 33 30 38 | g.from.VyOS.``1.4-rolling-202308 |
| 0840 | 30 34 30 35 35 37 60 60 2e 20 54 68 65 20 66 69 72 65 77 61 6c 6c 20 73 75 70 70 6f 72 74 73 20 | 040557``..The.firewall.supports. |
| 0860 | 63 72 65 61 74 69 6f 6e 20 6f 66 20 64 69 73 74 69 6e 63 74 2c 20 69 6e 74 65 72 6c 69 6e 6b 65 | creation.of.distinct,.interlinke |
| 0880 | 64 20 63 68 61 69 6e 73 20 66 6f 72 20 65 61 63 68 20 60 4e 65 74 66 69 6c 74 65 72 20 68 6f 6f | d.chains.for.each.`Netfilter.hoo |
| 08a0 | 6b 20 3c 68 74 74 70 73 3a 2f 2f 77 69 6b 69 2e 6e 66 74 61 62 6c 65 73 2e 6f 72 67 2f 77 69 6b | k.<https://wiki.nftables.org/wik |
| 08c0 | 69 2d 6e 66 74 61 62 6c 65 73 2f 69 6e 64 65 78 2e 70 68 70 2f 4e 65 74 66 69 6c 74 65 72 5f 68 | i-nftables/index.php/Netfilter_h |
| 08e0 | 6f 6f 6b 73 3e 60 5f 20 61 6e 64 20 61 6c 6c 6f 77 73 20 66 6f 72 20 6d 6f 72 65 20 67 72 61 6e | ooks>`_.and.allows.for.more.gran |
| 0900 | 75 6c 61 72 20 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 74 68 65 20 70 61 63 6b 65 74 20 66 69 6c | ular.control.over.the.packet.fil |
| 0920 | 74 65 72 69 6e 67 20 70 72 6f 63 65 73 73 2e 00 41 20 72 75 6c 65 20 74 6f 20 60 60 61 63 63 65 | tering.process..A.rule.to.``acce |
| 0940 | 70 74 60 60 20 70 61 63 6b 65 74 73 20 66 72 6f 6d 20 65 73 74 61 62 6c 69 73 68 65 64 20 61 6e | pt``.packets.from.established.an |
| 0960 | 64 20 72 65 6c 61 74 65 64 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 00 41 20 72 75 6c 65 20 74 6f | d.related.connections..A.rule.to |
| 0980 | 20 60 60 64 72 6f 70 60 60 20 70 61 63 6b 65 74 73 20 66 72 6f 6d 20 69 6e 76 61 6c 69 64 20 63 | .``drop``.packets.from.invalid.c |
| 09a0 | 6f 6e 6e 65 63 74 69 6f 6e 73 2e 00 41 64 64 20 61 20 73 65 74 20 6f 66 20 66 69 72 65 77 61 6c | onnections..Add.a.set.of.firewal |
| 09c0 | 6c 20 70 6f 6c 69 63 69 65 73 20 66 6f 72 20 6f 75 72 20 6f 75 74 73 69 64 65 2f 57 41 4e 20 69 | l.policies.for.our.outside/WAN.i |
| 09e0 | 6e 74 65 72 66 61 63 65 2e 00 41 66 74 65 72 20 65 76 65 72 79 20 63 6f 6e 66 69 67 75 72 61 74 | nterface..After.every.configurat |
| 0a00 | 69 6f 6e 20 63 68 61 6e 67 65 2c 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 61 70 70 6c 79 20 74 68 | ion.change,.you.need.to.apply.th |
| 0a20 | 65 20 63 68 61 6e 67 65 73 20 62 79 20 75 73 69 6e 67 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 | e.changes.by.using.the.following |
| 0a40 | 20 63 6f 6d 6d 61 6e 64 3a 00 41 66 74 65 72 20 73 77 69 74 63 68 69 6e 67 20 74 6f 20 3a 72 65 | .command:.After.switching.to.:re |
| 0a60 | 66 3a 60 71 75 69 63 6b 2d 73 74 61 72 74 2d 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2d 6d 6f 64 | f:`quick-start-configuration-mod |
| 0a80 | 65 60 20 69 73 73 75 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 2c | e`.issue.the.following.commands, |
| 0aa0 | 20 61 6e 64 20 79 6f 75 72 20 73 79 73 74 65 6d 20 77 69 6c 6c 20 6c 69 73 74 65 6e 20 6f 6e 20 | .and.your.system.will.listen.on. |
| 0ac0 | 65 76 65 72 79 20 69 6e 74 65 72 66 61 63 65 20 66 6f 72 20 69 6e 63 6f 6d 69 6e 67 20 53 53 48 | every.interface.for.incoming.SSH |
| 0ae0 | 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 20 59 6f 75 20 6d 69 67 68 74 20 77 61 6e 74 20 74 6f 20 | .connections..You.might.want.to. |
| 0b00 | 63 68 65 63 6b 20 74 68 65 20 3a 72 65 66 3a 60 73 73 68 60 20 63 68 61 70 74 65 72 20 6f 6e 20 | check.the.:ref:`ssh`.chapter.on. |
| 0b20 | 68 6f 77 20 74 6f 20 6c 69 73 74 65 6e 20 6f 6e 20 73 70 65 63 69 66 69 63 20 61 64 64 72 65 73 | how.to.listen.on.specific.addres |
| 0b40 | 73 65 73 20 6f 6e 6c 79 2e 00 41 66 74 65 72 20 73 77 69 74 63 68 69 6e 67 20 74 6f 20 3a 72 65 | ses.only..After.switching.to.:re |
| 0b60 | 66 3a 60 71 75 69 63 6b 2d 73 74 61 72 74 2d 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2d 6d 6f 64 | f:`quick-start-configuration-mod |
| 0b80 | 65 60 20 69 73 73 75 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 3a | e`.issue.the.following.commands: |
| 0ba0 | 00 41 6c 6c 6f 77 20 41 63 63 65 73 73 20 74 6f 20 53 65 72 76 69 63 65 73 00 41 6c 6c 6f 77 20 | .Allow.Access.to.Services.Allow. |
| 0bc0 | 4d 61 6e 61 67 65 6d 65 6e 74 20 41 63 63 65 73 73 00 41 6c 74 65 72 6e 61 74 69 76 65 6c 79 2c | Management.Access.Alternatively, |
| 0be0 | 20 69 6e 73 74 65 61 64 20 6f 66 20 63 6f 6e 66 69 67 75 72 69 6e 67 20 74 68 65 20 60 60 43 4f | .instead.of.configuring.the.``CO |
| 0c00 | 4e 4e 5f 46 49 4c 54 45 52 60 60 20 63 68 61 69 6e 20 64 65 73 63 72 69 62 65 64 20 61 62 6f 76 | NN_FILTER``.chain.described.abov |
| 0c20 | 65 2c 20 79 6f 75 20 63 61 6e 20 74 61 6b 65 20 74 68 65 20 6d 6f 72 65 20 74 72 61 64 69 74 69 | e,.you.can.take.the.more.traditi |
| 0c40 | 6f 6e 61 6c 20 73 74 61 74 65 66 75 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 66 69 6c 74 65 72 69 | onal.stateful.connection.filteri |
| 0c60 | 6e 67 20 61 70 70 72 6f 61 63 68 20 62 79 20 63 72 65 61 74 69 6e 67 20 72 75 6c 65 73 20 6f 6e | ng.approach.by.creating.rules.on |
| 0c80 | 20 65 61 63 68 20 68 6f 6f 6b 27 73 20 63 68 61 69 6e 3a 00 41 6c 74 65 72 6e 61 74 69 76 65 6c | .each.hook's.chain:.Alternativel |
| 0ca0 | 79 2c 20 79 6f 75 20 63 61 6e 20 74 61 6b 65 20 74 68 65 20 6d 6f 72 65 20 74 72 61 64 69 74 69 | y,.you.can.take.the.more.traditi |
| 0cc0 | 6f 6e 61 6c 20 73 74 61 74 65 66 75 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 66 69 6c 74 65 72 69 | onal.stateful.connection.filteri |
| 0ce0 | 6e 67 20 61 70 70 72 6f 61 63 68 20 62 79 20 63 72 65 61 74 69 6e 67 20 72 75 6c 65 73 20 6f 6e | ng.approach.by.creating.rules.on |
| 0d00 | 20 65 61 63 68 20 62 61 73 65 20 68 6f 6f 6b 27 73 20 63 68 61 69 6e 3a 00 41 70 70 6c 79 20 74 | .each.base.hook's.chain:.Apply.t |
| 0d20 | 68 65 20 66 69 72 65 77 61 6c 6c 20 70 6f 6c 69 63 69 65 73 3a 00 41 73 20 61 62 6f 76 65 2c 20 | he.firewall.policies:.As.above,. |
| 0d40 | 63 6f 6d 6d 69 74 20 79 6f 75 72 20 63 68 61 6e 67 65 73 2c 20 73 61 76 65 20 74 68 65 20 63 6f | commit.your.changes,.save.the.co |
| 0d60 | 6e 66 69 67 75 72 61 74 69 6f 6e 2c 20 61 6e 64 20 65 78 69 74 20 63 6f 6e 66 69 67 75 72 61 74 | nfiguration,.and.exit.configurat |
| 0d80 | 69 6f 6e 20 6d 6f 64 65 3a 00 42 6c 6f 63 6b 20 49 6e 63 6f 6d 69 6e 67 20 54 72 61 66 66 69 63 | ion.mode:.Block.Incoming.Traffic |
| 0da0 | 00 42 79 20 64 65 66 61 75 6c 74 2c 20 56 79 4f 53 20 69 73 20 69 6e 20 6f 70 65 72 61 74 69 6f | .By.default,.VyOS.is.in.operatio |
| 0dc0 | 6e 61 6c 20 6d 6f 64 65 2c 20 61 6e 64 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 70 72 6f 6d 70 74 | nal.mode,.and.the.command.prompt |
| 0de0 | 20 64 69 73 70 6c 61 79 73 20 61 20 60 24 60 2e 20 54 6f 20 63 6f 6e 66 69 67 75 72 65 20 56 79 | .displays.a.`$`..To.configure.Vy |
| 0e00 | 4f 53 2c 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f 20 65 6e 74 65 72 20 63 6f 6e 66 69 | OS,.you.will.need.to.enter.confi |
| 0e20 | 67 75 72 61 74 69 6f 6e 20 6d 6f 64 65 2c 20 72 65 73 75 6c 74 69 6e 67 20 69 6e 20 74 68 65 20 | guration.mode,.resulting.in.the. |
| 0e40 | 63 6f 6d 6d 61 6e 64 20 70 72 6f 6d 70 74 20 64 69 73 70 6c 61 79 69 6e 67 20 61 20 60 23 60 2c | command.prompt.displaying.a.`#`, |
| 0e60 | 20 61 73 20 64 65 6d 6f 6e 73 74 72 61 74 65 64 20 62 65 6c 6f 77 3a 00 42 79 20 64 65 66 61 75 | .as.demonstrated.below:.By.defau |
| 0e80 | 6c 74 2c 20 56 79 4f 53 20 69 73 20 69 6e 20 6f 70 65 72 61 74 69 6f 6e 61 6c 20 6d 6f 64 65 2c | lt,.VyOS.is.in.operational.mode, |
| 0ea0 | 20 61 6e 64 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 70 72 6f 6d 70 74 20 64 69 73 70 6c 61 79 73 | .and.the.command.prompt.displays |
| 0ec0 | 20 61 20 60 60 24 60 60 2e 20 54 6f 20 63 6f 6e 66 69 67 75 72 65 20 56 79 4f 53 2c 20 79 6f 75 | .a.``$``..To.configure.VyOS,.you |
| 0ee0 | 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f 20 65 6e 74 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f | .will.need.to.enter.configuratio |
| 0f00 | 6e 20 6d 6f 64 65 2c 20 72 65 73 75 6c 74 69 6e 67 20 69 6e 20 74 68 65 20 63 6f 6d 6d 61 6e 64 | n.mode,.resulting.in.the.command |
| 0f20 | 20 70 72 6f 6d 70 74 20 64 69 73 70 6c 61 79 69 6e 67 20 61 20 60 60 23 60 60 2c 20 61 73 20 64 | .prompt.displaying.a.``#``,.as.d |
| 0f40 | 65 6d 6f 6e 73 74 72 61 74 65 64 20 62 65 6c 6f 77 3a 00 43 6f 6d 6d 69 74 20 61 6e 64 20 53 61 | emonstrated.below:.Commit.and.Sa |
| 0f60 | 76 65 00 43 6f 6d 6d 69 74 20 63 68 61 6e 67 65 73 2c 20 73 61 76 65 20 74 68 65 20 63 6f 6e 66 | ve.Commit.changes,.save.the.conf |
| 0f80 | 69 67 75 72 61 74 69 6f 6e 2c 20 61 6e 64 20 65 78 69 74 20 63 6f 6e 66 69 67 75 72 61 74 69 6f | iguration,.and.exit.configuratio |
| 0fa0 | 6e 20 6d 6f 64 65 3a 00 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 4d 6f 64 65 00 43 6f 6e 66 69 | n.mode:.Configuration.Mode.Confi |
| 0fc0 | 67 75 72 65 20 46 69 72 65 77 61 6c 6c 20 47 72 6f 75 70 73 00 43 6f 6e 66 69 67 75 72 65 20 53 | gure.Firewall.Groups.Configure.S |
| 0fe0 | 74 61 74 65 66 75 6c 20 50 61 63 6b 65 74 20 46 69 6c 74 65 72 69 6e 67 00 43 6f 6e 66 69 67 75 | tateful.Packet.Filtering.Configu |
| 1000 | 72 65 20 61 20 72 75 6c 65 20 6f 6e 20 74 68 65 20 60 60 69 6e 70 75 74 60 60 20 68 6f 6f 6b 20 | re.a.rule.on.the.``input``.hook. |
| 1020 | 66 69 6c 74 65 72 20 74 6f 20 6a 75 6d 70 20 74 6f 20 74 68 65 20 60 60 56 79 4f 53 5f 4d 41 4e | filter.to.jump.to.the.``VyOS_MAN |
| 1040 | 41 47 45 4d 45 4e 54 60 60 20 63 68 61 69 6e 20 77 68 65 6e 20 6e 65 77 20 63 6f 6e 6e 65 63 74 | AGEMENT``.chain.when.new.connect |
| 1060 | 69 6f 6e 73 20 61 72 65 20 61 64 64 72 65 73 73 65 64 20 74 6f 20 70 6f 72 74 20 32 32 20 28 53 | ions.are.addressed.to.port.22.(S |
| 1080 | 53 48 29 20 6f 6e 20 74 68 65 20 72 6f 75 74 65 72 20 69 74 73 65 6c 66 3a 00 43 72 65 61 74 65 | SH).on.the.router.itself:.Create |
| 10a0 | 20 61 20 6e 65 77 20 63 68 61 69 6e 20 28 60 60 4f 55 54 53 49 44 45 2d 49 4e 60 60 29 20 77 68 | .a.new.chain.(``OUTSIDE-IN``).wh |
| 10c0 | 69 63 68 20 77 69 6c 6c 20 64 72 6f 70 20 61 6c 6c 20 74 72 61 66 66 69 63 20 74 68 61 74 20 69 | ich.will.drop.all.traffic.that.i |
| 10e0 | 73 20 6e 6f 74 20 65 78 70 6c 69 63 69 74 6c 79 20 61 6c 6c 6f 77 65 64 20 61 74 20 73 6f 6d 65 | s.not.explicitly.allowed.at.some |
| 1100 | 20 70 6f 69 6e 74 20 69 6e 20 74 68 65 20 63 68 61 69 6e 2e 20 54 68 65 6e 2c 20 77 65 20 63 61 | .point.in.the.chain..Then,.we.ca |
| 1120 | 6e 20 6a 75 6d 70 20 74 6f 20 74 68 61 74 20 63 68 61 69 6e 20 66 72 6f 6d 20 74 68 65 20 60 60 | n.jump.to.that.chain.from.the.`` |
| 1140 | 66 6f 72 77 61 72 64 60 60 20 68 6f 6f 6b 20 77 68 65 6e 20 74 72 61 66 66 69 63 20 69 73 20 63 | forward``.hook.when.traffic.is.c |
| 1160 | 6f 6d 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 60 60 57 41 4e 60 60 20 69 6e 74 65 72 66 61 63 65 | oming.from.the.``WAN``.interface |
| 1180 | 20 67 72 6f 75 70 20 61 6e 64 20 69 73 20 61 64 64 72 65 73 73 65 64 20 74 6f 20 6f 75 72 20 6c | .group.and.is.addressed.to.our.l |
| 11a0 | 6f 63 61 6c 20 6e 65 74 77 6f 72 6b 2e 00 43 72 65 61 74 65 20 61 20 6e 65 77 20 63 68 61 69 6e | ocal.network..Create.a.new.chain |
| 11c0 | 20 28 60 60 4f 55 54 53 49 44 45 2d 49 4e 60 60 29 20 77 68 69 63 68 20 77 69 6c 6c 20 64 72 6f | .(``OUTSIDE-IN``).which.will.dro |
| 11e0 | 70 20 61 6c 6c 20 74 72 61 66 66 69 63 20 74 68 61 74 20 69 73 20 6e 6f 74 20 65 78 70 6c 69 63 | p.all.traffic.that.is.not.explic |
| 1200 | 69 74 79 20 61 6c 6c 6f 77 65 64 20 61 74 20 73 6f 6d 65 20 70 6f 69 6e 74 20 69 6e 20 74 68 65 | ity.allowed.at.some.point.in.the |
| 1220 | 20 63 68 61 69 6e 2e 20 54 68 65 6e 2c 20 77 65 20 63 61 6e 20 6a 75 6d 70 20 74 6f 20 74 68 61 | .chain..Then,.we.can.jump.to.tha |
| 1240 | 74 20 63 68 61 69 6e 20 66 72 6f 6d 20 74 68 65 20 60 60 66 6f 72 77 61 72 64 60 60 20 68 6f 6f | t.chain.from.the.``forward``.hoo |
| 1260 | 6b 20 77 68 65 6e 20 74 72 61 66 66 69 63 20 69 73 20 63 6f 6d 69 6e 67 20 66 72 6f 6d 20 74 68 | k.when.traffic.is.coming.from.th |
| 1280 | 65 20 60 60 57 41 4e 60 60 20 69 6e 74 65 72 66 61 63 65 20 67 72 6f 75 70 20 61 6e 64 20 69 73 | e.``WAN``.interface.group.and.is |
| 12a0 | 20 61 64 64 72 65 73 73 65 64 20 74 6f 20 6f 75 72 20 6c 6f 63 61 6c 20 6e 65 74 77 6f 72 6b 2e | .addressed.to.our.local.network. |
| 12c0 | 00 44 48 43 50 20 63 6c 69 65 6e 74 73 20 77 69 6c 6c 20 62 65 20 61 73 73 69 67 6e 65 64 20 49 | .DHCP.clients.will.be.assigned.I |
| 12e0 | 50 20 61 64 64 72 65 73 73 65 73 20 77 69 74 68 69 6e 20 74 68 65 20 72 61 6e 67 65 20 6f 66 20 | P.addresses.within.the.range.of. |
| 1300 | 60 31 39 32 2e 31 36 38 2e 30 2e 39 20 2d 20 31 39 32 2e 31 36 38 2e 30 2e 32 35 34 60 20 61 6e | `192.168.0.9.-.192.168.0.254`.an |
| 1320 | 64 20 68 61 76 65 20 61 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 20 6f 66 20 60 69 6e 74 65 72 6e 61 | d.have.a.domain.name.of.`interna |
| 1340 | 6c 2d 6e 65 74 77 6f 72 6b 60 00 44 48 43 50 20 63 6c 69 65 6e 74 73 20 77 69 6c 6c 20 62 65 20 | l-network`.DHCP.clients.will.be. |
| 1360 | 61 73 73 69 67 6e 65 64 20 49 50 20 61 64 64 72 65 73 73 65 73 20 77 69 74 68 69 6e 20 74 68 65 | assigned.IP.addresses.within.the |
| 1380 | 20 72 61 6e 67 65 20 6f 66 20 60 60 31 39 32 2e 31 36 38 2e 30 2e 39 20 2d 20 31 39 32 2e 31 36 | .range.of.``192.168.0.9.-.192.16 |
| 13a0 | 38 2e 30 2e 32 35 34 60 60 20 61 6e 64 20 68 61 76 65 20 61 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 | 8.0.254``.and.have.a.domain.name |
| 13c0 | 20 6f 66 20 60 60 69 6e 74 65 72 6e 61 6c 2d 6e 65 74 77 6f 72 6b 60 60 00 44 48 43 50 20 6c 65 | .of.``internal-network``.DHCP.le |
| 13e0 | 61 73 65 73 20 77 69 6c 6c 20 68 6f 6c 64 20 66 6f 72 20 6f 6e 65 20 64 61 79 20 28 38 36 34 30 | ases.will.hold.for.one.day.(8640 |
| 1400 | 30 20 73 65 63 6f 6e 64 73 29 00 44 48 43 50 2f 44 4e 53 20 71 75 69 63 6b 2d 73 74 61 72 74 00 | 0.seconds).DHCP/DNS.quick-start. |
| 1420 | 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 6d 6f 73 74 20 6f 66 20 74 68 65 20 6e 65 | Documentation.for.most.of.the.ne |
| 1440 | 77 20 66 69 72 65 77 61 6c 6c 20 43 4c 49 20 63 61 6e 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 74 | w.firewall.CLI.can.be.found.in.t |
| 1460 | 68 65 20 3a 72 65 66 3a 60 66 69 72 65 77 61 6c 6c 60 20 63 68 61 70 74 65 72 2e 54 68 65 20 6c | he.:ref:`firewall`.chapter.The.l |
| 1480 | 65 67 61 63 79 20 66 69 72 65 77 61 6c 6c 20 69 73 20 73 74 69 6c 6c 20 61 76 61 69 6c 61 62 6c | egacy.firewall.is.still.availabl |
| 14a0 | 65 20 66 6f 72 20 76 65 72 73 69 6f 6e 73 20 62 65 66 6f 72 65 20 60 60 31 2e 34 2d 72 6f 6c 6c | e.for.versions.before.``1.4-roll |
| 14c0 | 69 6e 67 2d 32 30 32 33 30 38 30 34 30 35 35 37 60 60 20 61 6e 64 20 63 61 6e 20 62 65 20 66 6f | ing-202308040557``.and.can.be.fo |
| 14e0 | 75 6e 64 20 69 6e 20 74 68 65 20 3a 72 65 66 3a 60 66 69 72 65 77 61 6c 6c 2d 6c 65 67 61 63 79 | und.in.the.:ref:`firewall-legacy |
| 1500 | 60 20 63 68 61 70 74 65 72 2e 20 54 68 65 20 65 78 61 6d 70 6c 65 73 20 69 6e 20 74 68 69 73 20 | `.chapter..The.examples.in.this. |
| 1520 | 73 65 63 74 69 6f 6e 20 75 73 65 20 74 68 65 20 6e 65 77 20 63 6f 6e 66 69 67 75 72 61 74 69 6f | section.use.the.new.configuratio |
| 1540 | 6e 2e 00 45 73 70 65 63 69 61 6c 6c 79 20 69 66 20 79 6f 75 20 61 72 65 20 61 6c 6c 6f 77 69 6e | n..Especially.if.you.are.allowin |
| 1560 | 67 20 53 53 48 20 72 65 6d 6f 74 65 20 61 63 63 65 73 73 20 66 72 6f 6d 20 74 68 65 20 6f 75 74 | g.SSH.remote.access.from.the.out |
| 1580 | 73 69 64 65 2f 57 41 4e 20 69 6e 74 65 72 66 61 63 65 2c 20 74 68 65 72 65 20 61 72 65 20 61 20 | side/WAN.interface,.there.are.a. |
| 15a0 | 66 65 77 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 73 74 65 | few.additional.configuration.ste |
| 15c0 | 70 73 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 74 61 6b 65 6e 2e 00 46 69 6e 61 6c 6c 79 | ps.that.should.be.taken..Finally |
| 15e0 | 2c 20 63 6f 6e 66 69 67 75 72 65 20 74 68 65 20 60 60 56 79 4f 53 5f 4d 41 4e 41 47 45 4d 45 4e | ,.configure.the.``VyOS_MANAGEMEN |
| 1600 | 54 60 60 20 63 68 61 69 6e 20 74 6f 20 61 63 63 65 70 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 66 | T``.chain.to.accept.connection.f |
| 1620 | 72 6f 6d 20 74 68 65 20 60 60 4c 41 4e 60 60 20 69 6e 74 65 72 66 61 63 65 20 67 72 6f 75 70 20 | rom.the.``LAN``.interface.group. |
| 1640 | 77 68 69 6c 65 20 6c 69 6d 69 74 69 6e 67 20 72 65 71 75 65 73 74 73 20 63 6f 6d 69 6e 67 20 66 | while.limiting.requests.coming.f |
| 1660 | 72 6f 6d 20 74 68 65 20 60 60 57 41 4e 60 60 20 69 6e 74 65 72 66 61 63 65 20 67 72 6f 75 70 20 | rom.the.``WAN``.interface.group. |
| 1680 | 74 6f 20 34 20 70 65 72 20 6d 69 6e 75 74 65 3a 00 46 69 6e 61 6c 6c 79 2c 20 74 72 79 20 61 6e | to.4.per.minute:.Finally,.try.an |
| 16a0 | 64 20 53 53 48 20 69 6e 74 6f 20 74 68 65 20 56 79 4f 53 20 69 6e 73 74 61 6c 6c 20 61 73 20 79 | d.SSH.into.the.VyOS.install.as.y |
| 16c0 | 6f 75 72 20 6e 65 77 20 75 73 65 72 2e 20 4f 6e 63 65 20 79 6f 75 20 68 61 76 65 20 63 6f 6e 66 | our.new.user..Once.you.have.conf |
| 16e0 | 69 72 6d 65 64 20 74 68 61 74 20 79 6f 75 72 20 6e 65 77 20 75 73 65 72 20 63 61 6e 20 61 63 63 | irmed.that.your.new.user.can.acc |
| 1700 | 65 73 73 20 79 6f 75 72 20 72 6f 75 74 65 72 20 77 69 74 68 6f 75 74 20 61 20 70 61 73 73 77 6f | ess.your.router.without.a.passwo |
| 1720 | 72 64 2c 20 64 65 6c 65 74 65 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 60 60 76 79 6f 73 60 60 | rd,.delete.the.original.``vyos`` |
| 1740 | 20 75 73 65 72 20 61 6e 64 20 63 6f 6d 70 6c 65 74 65 6c 79 20 64 69 73 61 62 6c 65 20 70 61 73 | .user.and.completely.disable.pas |
| 1760 | 73 77 6f 72 64 20 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 20 66 6f 72 20 3a 72 65 66 3a 60 73 | sword.authentication.for.:ref:`s |
| 1780 | 73 68 60 3a 00 46 69 6e 61 6c 6c 79 2c 20 77 65 20 63 61 6e 20 6e 6f 77 20 63 6f 6e 66 69 67 75 | sh`:.Finally,.we.can.now.configu |
| 17a0 | 72 65 20 61 63 63 65 73 73 20 74 6f 20 74 68 65 20 73 65 72 76 69 63 65 73 20 72 75 6e 6e 69 6e | re.access.to.the.services.runnin |
| 17c0 | 67 20 6f 6e 20 74 68 69 73 20 72 6f 75 74 65 72 2c 20 61 6c 6c 6f 77 69 6e 67 20 61 6c 6c 20 63 | g.on.this.router,.allowing.all.c |
| 17e0 | 6f 6e 6e 65 63 74 69 6f 6e 73 20 63 6f 6d 69 6e 67 20 66 72 6f 6d 20 6c 6f 63 61 6c 68 6f 73 74 | onnections.coming.from.localhost |
| 1800 | 3a 00 46 69 72 65 77 61 6c 6c 00 46 69 72 73 74 2c 20 63 72 65 61 74 65 20 61 20 6e 65 77 20 64 | :.Firewall.First,.create.a.new.d |
| 1820 | 65 64 69 63 61 74 65 64 20 63 68 61 69 6e 20 28 60 60 56 79 4f 53 5f 4d 41 4e 41 47 45 4d 45 4e | edicated.chain.(``VyOS_MANAGEMEN |
| 1840 | 54 60 60 29 20 66 6f 72 20 6d 61 6e 61 67 65 6d 65 6e 74 20 61 63 63 65 73 73 2c 20 77 68 69 63 | T``).for.management.access,.whic |
| 1860 | 68 20 72 65 74 75 72 6e 73 20 74 6f 20 74 68 65 20 70 61 72 65 6e 74 20 63 68 61 69 6e 20 69 66 | h.returns.to.the.parent.chain.if |
| 1880 | 20 6e 6f 20 61 63 74 69 6f 6e 20 69 73 20 74 61 6b 65 6e 2e 20 41 64 64 20 61 20 72 75 6c 65 20 | .no.action.is.taken..Add.a.rule. |
| 18a0 | 74 6f 20 61 63 63 65 70 74 20 74 72 61 66 66 69 63 20 66 72 6f 6d 20 74 68 65 20 60 60 4c 41 4e | to.accept.traffic.from.the.``LAN |
| 18c0 | 60 60 20 69 6e 74 65 72 66 61 63 65 20 67 72 6f 75 70 3a 00 48 61 72 64 65 6e 69 6e 67 00 48 65 | ``.interface.group:.Hardening.He |
| 18e0 | 72 65 20 77 65 27 72 65 20 61 6c 6c 6f 77 69 6e 67 20 74 68 65 20 72 6f 75 74 65 72 20 74 6f 20 | re.we're.allowing.the.router.to. |
| 1900 | 72 65 73 70 6f 6e 64 20 74 6f 20 70 69 6e 67 73 2e 20 54 68 65 6e 2c 20 77 65 20 63 61 6e 20 61 | respond.to.pings..Then,.we.can.a |
| 1920 | 6c 6c 6f 77 20 61 63 63 65 73 73 20 74 6f 20 74 68 65 20 44 4e 53 20 72 65 63 75 72 73 6f 72 20 | llow.access.to.the.DNS.recursor. |
| 1940 | 77 65 20 63 6f 6e 66 69 67 75 72 65 64 20 65 61 72 6c 69 65 72 2c 20 61 63 63 65 70 74 69 6e 67 | we.configured.earlier,.accepting |
| 1960 | 20 74 72 61 66 66 69 63 20 62 6f 75 6e 64 20 66 6f 72 20 70 6f 72 74 20 35 33 20 66 72 6f 6d 20 | .traffic.bound.for.port.53.from. |
| 1980 | 61 6c 6c 20 68 6f 73 74 73 20 6f 6e 20 74 68 65 20 60 60 4e 45 54 2d 49 4e 53 49 44 45 2d 76 34 | all.hosts.on.the.``NET-INSIDE-v4 |
| 19a0 | 60 60 20 6e 65 74 77 6f 72 6b 3a 00 49 66 20 79 6f 75 20 77 61 6e 74 65 64 20 74 6f 20 65 6e 61 | ``.network:.If.you.wanted.to.ena |
| 19c0 | 62 6c 65 20 53 53 48 20 61 63 63 65 73 73 20 74 6f 20 79 6f 75 72 20 66 69 72 65 77 61 6c 6c 20 | ble.SSH.access.to.your.firewall. |
| 19e0 | 66 72 6f 6d 20 74 68 65 20 6f 75 74 73 69 64 65 2f 57 41 4e 20 69 6e 74 65 72 66 61 63 65 2c 20 | from.the.outside/WAN.interface,. |
| 1a00 | 79 6f 75 20 63 6f 75 6c 64 20 63 72 65 61 74 65 20 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c | you.could.create.some.additional |
| 1a20 | 20 72 75 6c 65 73 20 74 6f 20 61 6c 6c 6f 77 20 74 68 61 74 20 6b 69 6e 64 20 6f 66 20 74 72 61 | .rules.to.allow.that.kind.of.tra |
| 1a40 | 66 66 69 63 2e 00 49 6e 20 74 68 69 73 20 63 61 73 65 2c 20 77 65 20 77 69 6c 6c 20 63 72 65 61 | ffic..In.this.case,.we.will.crea |
| 1a60 | 74 65 20 74 77 6f 20 69 6e 74 65 72 66 61 63 65 20 67 72 6f 75 70 73 20 e2 80 94 20 61 20 60 60 | te.two.interface.groups.....a.`` |
| 1a80 | 57 41 4e 60 60 20 67 72 6f 75 70 20 66 6f 72 20 6f 75 72 20 69 6e 74 65 72 66 61 63 65 73 20 63 | WAN``.group.for.our.interfaces.c |
| 1aa0 | 6f 6e 6e 65 63 74 65 64 20 74 6f 20 74 68 65 20 70 75 62 6c 69 63 20 69 6e 74 65 72 6e 65 74 20 | onnected.to.the.public.internet. |
| 1ac0 | 61 6e 64 20 61 20 60 60 4c 41 4e 60 60 20 67 72 6f 75 70 20 66 6f 72 20 74 68 65 20 69 6e 74 65 | and.a.``LAN``.group.for.the.inte |
| 1ae0 | 72 66 61 63 65 73 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 6f 75 72 20 69 6e 74 65 72 6e 61 6c | rfaces.connected.to.our.internal |
| 1b00 | 20 6e 65 74 77 6f 72 6b 2e 20 41 64 64 69 74 69 6f 6e 61 6c 6c 79 2c 20 77 65 20 77 69 6c 6c 20 | .network..Additionally,.we.will. |
| 1b20 | 63 72 65 61 74 65 20 61 20 6e 65 74 77 6f 72 6b 20 67 72 6f 75 70 2c 20 60 60 4e 45 54 2d 49 4e | create.a.network.group,.``NET-IN |
| 1b40 | 53 49 44 45 2d 76 34 60 60 2c 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 6f 75 72 20 69 6e 74 | SIDE-v4``,.that.contains.our.int |
| 1b60 | 65 72 6e 61 6c 20 73 75 62 6e 65 74 2e 00 49 6e 20 74 68 69 73 20 63 61 73 65 2c 20 77 65 20 77 | ernal.subnet..In.this.case,.we.w |
| 1b80 | 69 6c 6c 20 63 72 65 61 74 65 20 74 77 6f 20 69 6e 74 65 72 66 61 63 65 20 67 72 6f 75 70 73 e2 | ill.create.two.interface.groups. |
| 1ba0 | 80 94 61 20 60 60 57 41 4e 60 60 20 67 72 6f 75 70 20 66 6f 72 20 6f 75 72 20 69 6e 74 65 72 66 | ..a.``WAN``.group.for.our.interf |
| 1bc0 | 61 63 65 73 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 74 68 65 20 70 75 62 6c 69 63 20 69 6e 74 | aces.connected.to.the.public.int |
| 1be0 | 65 72 6e 65 74 20 61 6e 64 20 61 20 60 60 4c 41 4e 60 60 20 67 72 6f 75 70 20 66 6f 72 20 74 68 | ernet.and.a.``LAN``.group.for.th |
| 1c00 | 65 20 69 6e 74 65 72 66 61 63 65 73 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 6f 75 72 20 69 6e | e.interfaces.connected.to.our.in |
| 1c20 | 74 65 72 6e 61 6c 20 6e 65 74 77 6f 72 6b 2e 20 41 64 64 69 74 69 6f 6e 61 6c 6c 79 2c 20 77 65 | ternal.network..Additionally,.we |
| 1c40 | 20 77 69 6c 6c 20 63 72 65 61 74 65 20 61 20 6e 65 74 77 6f 72 6b 20 67 72 6f 75 70 2c 20 60 60 | .will.create.a.network.group,.`` |
| 1c60 | 4e 45 54 2d 49 4e 53 49 44 45 2d 76 34 60 60 2c 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 6f | NET-INSIDE-v4``,.that.contains.o |
| 1c80 | 75 72 20 69 6e 74 65 72 6e 61 6c 20 73 75 62 6e 65 74 2e 00 49 6e 74 65 72 66 61 63 65 20 43 6f | ur.internal.subnet..Interface.Co |
| 1ca0 | 6e 66 69 67 75 72 61 74 69 6f 6e 00 4d 6f 73 74 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 73 20 77 | nfiguration.Most.installations.w |
| 1cc0 | 6f 75 6c 64 20 63 68 6f 6f 73 65 20 74 68 69 73 20 6f 70 74 69 6f 6e 2c 20 61 6e 64 20 77 69 6c | ould.choose.this.option,.and.wil |
| 1ce0 | 6c 20 63 6f 6e 74 61 69 6e 3a 00 4e 41 54 00 4e 6f 77 20 74 68 61 74 20 77 65 20 68 61 76 65 20 | l.contain:.NAT.Now.that.we.have. |
| 1d00 | 63 6f 6e 66 69 67 75 72 65 64 20 73 74 61 74 65 66 75 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 66 | configured.stateful.connection.f |
| 1d20 | 69 6c 74 65 72 69 6e 67 20 74 6f 20 61 6c 6c 6f 77 20 74 72 61 66 66 69 63 20 66 72 6f 6d 20 65 | iltering.to.allow.traffic.from.e |
| 1d40 | 73 74 61 62 6c 69 73 68 65 64 20 61 6e 64 20 72 65 6c 61 74 65 64 20 63 6f 6e 6e 65 63 74 69 6f | stablished.and.related.connectio |
| 1d60 | 6e 73 2c 20 77 65 20 63 61 6e 20 62 6c 6f 63 6b 20 61 6c 6c 20 6f 74 68 65 72 20 69 6e 63 6f 6d | ns,.we.can.block.all.other.incom |
| 1d80 | 69 6e 67 20 74 72 61 66 66 69 63 20 61 64 64 72 65 73 73 65 64 20 74 6f 20 6f 75 72 20 6c 6f 63 | ing.traffic.addressed.to.our.loc |
| 1da0 | 61 6c 20 6e 65 74 77 6f 72 6b 2e 00 4f 6e 63 65 20 79 6f 75 72 20 63 6f 6e 66 69 67 75 72 61 74 | al.network..Once.your.configurat |
| 1dc0 | 69 6f 6e 20 77 6f 72 6b 73 20 61 73 20 65 78 70 65 63 74 65 64 2c 20 79 6f 75 20 63 61 6e 20 73 | ion.works.as.expected,.you.can.s |
| 1de0 | 61 76 65 20 69 74 20 70 65 72 6d 61 6e 65 6e 74 6c 79 20 62 79 20 75 73 69 6e 67 20 74 68 65 20 | ave.it.permanently.by.using.the. |
| 1e00 | 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6d 6d 61 6e 64 3a 00 4f 6e 6c 79 20 68 6f 73 74 73 20 66 72 | following.command:.Only.hosts.fr |
| 1e20 | 6f 6d 20 79 6f 75 72 20 69 6e 74 65 72 6e 61 6c 2f 4c 41 4e 20 6e 65 74 77 6f 72 6b 20 63 61 6e | om.your.internal/LAN.network.can |
| 1e40 | 20 75 73 65 20 74 68 65 20 44 4e 53 20 72 65 63 75 72 73 6f 72 00 4f 70 74 69 6f 6e 20 31 3a 20 | .use.the.DNS.recursor.Option.1:. |
| 1e60 | 43 6f 6d 6d 6f 6e 20 43 68 61 69 6e 00 4f 70 74 69 6f 6e 20 31 3a 20 47 6c 6f 62 61 6c 20 53 74 | Common.Chain.Option.1:.Global.St |
| 1e80 | 61 74 65 20 50 6f 6c 69 63 69 65 73 00 4f 70 74 69 6f 6e 20 32 3a 20 43 6f 6d 6d 6f 6e 2f 43 75 | ate.Policies.Option.2:.Common/Cu |
| 1ea0 | 73 74 6f 6d 20 43 68 61 69 6e 00 4f 70 74 69 6f 6e 20 32 3a 20 50 65 72 2d 48 6f 6f 6b 20 43 68 | stom.Chain.Option.2:.Per-Hook.Ch |
| 1ec0 | 61 69 6e 00 4f 70 74 69 6f 6e 20 33 3a 20 50 65 72 2d 48 6f 6f 6b 20 43 68 61 69 6e 00 51 75 69 | ain.Option.3:.Per-Hook.Chain.Qui |
| 1ee0 | 63 6b 20 53 74 61 72 74 00 52 65 70 6c 61 63 65 20 74 68 65 20 64 65 66 61 75 6c 74 20 60 60 76 | ck.Start.Replace.the.default.``v |
| 1f00 | 79 6f 73 60 60 20 73 79 73 74 65 6d 20 75 73 65 72 3a 00 52 65 70 6c 61 63 65 20 74 68 65 20 64 | yos``.system.user:.Replace.the.d |
| 1f20 | 65 66 61 75 6c 74 20 60 76 79 6f 73 60 20 73 79 73 74 65 6d 20 75 73 65 72 3a 00 53 53 48 20 4d | efault.`vyos`.system.user:.SSH.M |
| 1f40 | 61 6e 61 67 65 6d 65 6e 74 00 53 65 74 20 75 70 20 3a 72 65 66 3a 60 73 73 68 5f 6b 65 79 5f 62 | anagement.Set.up.:ref:`ssh_key_b |
| 1f60 | 61 73 65 64 5f 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 60 3a 00 54 68 65 20 61 64 64 72 65 73 | ased_authentication`:.The.addres |
| 1f80 | 73 20 72 61 6e 67 65 20 60 31 39 32 2e 31 36 38 2e 30 2e 32 2f 32 34 20 2d 20 31 39 32 2e 31 36 | s.range.`192.168.0.2/24.-.192.16 |
| 1fa0 | 38 2e 30 2e 38 2f 32 34 60 20 77 69 6c 6c 20 62 65 20 72 65 73 65 72 76 65 64 20 66 6f 72 20 73 | 8.0.8/24`.will.be.reserved.for.s |
| 1fc0 | 74 61 74 69 63 20 61 73 73 69 67 6e 6d 65 6e 74 73 00 54 68 65 20 61 64 64 72 65 73 73 20 72 61 | tatic.assignments.The.address.ra |
| 1fe0 | 6e 67 65 20 60 60 31 39 32 2e 31 36 38 2e 30 2e 32 2f 32 34 20 2d 20 31 39 32 2e 31 36 38 2e 30 | nge.``192.168.0.2/24.-.192.168.0 |
| 2000 | 2e 38 2f 32 34 60 60 20 77 69 6c 6c 20 62 65 20 72 65 73 65 72 76 65 64 20 66 6f 72 20 73 74 61 | .8/24``.will.be.reserved.for.sta |
| 2020 | 74 69 63 20 61 73 73 69 67 6e 6d 65 6e 74 73 00 54 68 65 20 63 68 61 69 6e 20 77 65 20 77 69 6c | tic.assignments.The.chain.we.wil |
| 2040 | 6c 20 63 72 65 61 74 65 20 69 73 20 63 61 6c 6c 65 64 20 60 60 43 4f 4e 4e 5f 46 49 4c 54 45 52 | l.create.is.called.``CONN_FILTER |
| 2060 | 60 60 20 61 6e 64 20 68 61 73 20 74 68 72 65 65 20 72 75 6c 65 73 3a 00 54 68 65 20 64 65 66 61 | ``.and.has.three.rules:.The.defa |
| 2080 | 75 6c 74 20 67 61 74 65 77 61 79 20 61 6e 64 20 44 4e 53 20 72 65 63 75 72 73 6f 72 20 61 64 64 | ult.gateway.and.DNS.recursor.add |
| 20a0 | 72 65 73 73 20 77 69 6c 6c 20 62 65 20 60 31 39 32 2e 31 36 38 2e 30 2e 31 2f 32 34 60 00 54 68 | ress.will.be.`192.168.0.1/24`.Th |
| 20c0 | 65 20 64 65 66 61 75 6c 74 20 67 61 74 65 77 61 79 20 61 6e 64 20 44 4e 53 20 72 65 63 75 72 73 | e.default.gateway.and.DNS.recurs |
| 20e0 | 6f 72 20 61 64 64 72 65 73 73 20 77 69 6c 6c 20 62 65 20 60 60 31 39 32 2e 31 36 38 2e 30 2e 31 | or.address.will.be.``192.168.0.1 |
| 2100 | 2f 32 34 60 60 00 54 68 65 20 66 69 72 65 77 61 6c 6c 20 62 65 67 69 6e 73 20 77 69 74 68 20 74 | /24``.The.firewall.begins.with.t |
| 2120 | 68 65 20 62 61 73 65 20 60 60 66 69 6c 74 65 72 60 60 20 74 61 62 6c 65 73 20 79 6f 75 20 64 65 | he.base.``filter``.tables.you.de |
| 2140 | 66 69 6e 65 20 66 6f 72 20 65 61 63 68 20 6f 66 20 74 68 65 20 60 60 66 6f 72 77 61 72 64 60 60 | fine.for.each.of.the.``forward`` |
| 2160 | 2c 20 60 60 69 6e 70 75 74 60 60 2c 20 61 6e 64 20 60 60 6f 75 74 70 75 74 60 60 20 4e 65 74 66 | ,.``input``,.and.``output``.Netf |
| 2180 | 69 74 65 72 20 68 6f 6f 6b 73 2e 20 45 61 63 68 20 6f 66 20 74 68 65 73 65 20 74 61 62 6c 65 73 | iter.hooks..Each.of.these.tables |
| 21a0 | 20 69 73 20 70 6f 70 75 6c 61 74 65 64 20 77 69 74 68 20 72 75 6c 65 73 20 74 68 61 74 20 61 72 | .is.populated.with.rules.that.ar |
| 21c0 | 65 20 70 72 6f 63 65 73 73 65 64 20 69 6e 20 6f 72 64 65 72 20 61 6e 64 20 63 61 6e 20 6a 75 6d | e.processed.in.order.and.can.jum |
| 21e0 | 70 20 74 6f 20 6f 74 68 65 72 20 63 68 61 69 6e 73 20 66 6f 72 20 6d 6f 72 65 20 67 72 61 6e 75 | p.to.other.chains.for.more.granu |
| 2200 | 6c 61 72 20 66 69 6c 74 65 72 69 6e 67 2e 00 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 73 65 74 | lar.filtering..The.following.set |
| 2220 | 74 69 6e 67 73 20 77 69 6c 6c 20 63 6f 6e 66 69 67 75 72 65 20 3a 72 65 66 3a 60 73 6f 75 72 63 | tings.will.configure.:ref:`sourc |
| 2240 | 65 2d 6e 61 74 60 20 72 75 6c 65 73 20 66 6f 72 20 6f 75 72 20 69 6e 74 65 72 6e 61 6c 2f 4c 41 | e-nat`.rules.for.our.internal/LA |
| 2260 | 4e 20 6e 65 74 77 6f 72 6b 2c 20 61 6c 6c 6f 77 69 6e 67 20 68 6f 73 74 73 20 74 6f 20 63 6f 6d | N.network,.allowing.hosts.to.com |
| 2280 | 6d 75 6e 69 63 61 74 65 20 74 68 72 6f 75 67 68 20 74 68 65 20 6f 75 74 73 69 64 65 2f 57 41 4e | municate.through.the.outside/WAN |
| 22a0 | 20 6e 65 74 77 6f 72 6b 20 76 69 61 20 49 50 20 6d 61 73 71 75 65 72 61 64 65 2e 00 54 68 65 20 | .network.via.IP.masquerade..The. |
| 22c0 | 66 6f 6c 6c 6f 77 69 6e 67 20 73 65 74 74 69 6e 67 73 20 77 69 6c 6c 20 63 6f 6e 66 69 67 75 72 | following.settings.will.configur |
| 22e0 | 65 20 44 48 43 50 20 61 6e 64 20 44 4e 53 20 73 65 72 76 69 63 65 73 20 6f 6e 20 79 6f 75 72 20 | e.DHCP.and.DNS.services.on.your. |
| 2300 | 69 6e 74 65 72 6e 61 6c 2f 4c 41 4e 20 6e 65 74 77 6f 72 6b 2c 20 77 68 65 72 65 20 56 79 4f 53 | internal/LAN.network,.where.VyOS |
| 2320 | 20 77 69 6c 6c 20 61 63 74 20 61 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 67 61 74 65 77 61 79 | .will.act.as.the.default.gateway |
| 2340 | 20 61 6e 64 20 44 4e 53 20 73 65 72 76 65 72 2e 00 54 68 65 6e 2c 20 77 65 20 63 61 6e 20 6a 75 | .and.DNS.server..Then,.we.can.ju |
| 2360 | 6d 70 20 74 6f 20 74 68 65 20 63 6f 6d 6d 6f 6e 20 63 68 61 69 6e 20 66 72 6f 6d 20 62 6f 74 68 | mp.to.the.common.chain.from.both |
| 2380 | 20 74 68 65 20 60 60 66 6f 72 77 61 72 64 60 60 20 61 6e 64 20 60 60 69 6e 70 75 74 60 60 20 68 | .the.``forward``.and.``input``.h |
| 23a0 | 6f 6f 6b 73 20 61 73 20 74 68 65 20 66 69 72 73 74 20 66 69 6c 74 65 72 69 6e 67 20 72 75 6c 65 | ooks.as.the.first.filtering.rule |
| 23c0 | 20 69 6e 20 74 68 65 20 72 65 73 70 65 63 74 69 76 65 20 63 68 61 69 6e 73 3a 00 54 68 65 73 65 | .in.the.respective.chains:.These |
| 23e0 | 20 72 75 6c 65 73 20 61 6c 6c 6f 77 20 53 53 48 20 74 72 61 66 66 69 63 20 61 6e 64 20 72 61 74 | .rules.allow.SSH.traffic.and.rat |
| 2400 | 65 20 6c 69 6d 69 74 20 69 74 20 74 6f 20 34 20 72 65 71 75 65 73 74 73 20 70 65 72 20 6d 69 6e | e.limit.it.to.4.requests.per.min |
| 2420 | 75 74 65 2e 20 54 68 69 73 20 62 6c 6f 63 6b 73 20 62 72 75 74 65 2d 66 6f 72 63 69 6e 67 20 61 | ute..This.blocks.brute-forcing.a |
| 2440 | 74 74 65 6d 70 74 73 3a 00 54 68 69 73 20 63 68 61 70 74 65 72 20 77 69 6c 6c 20 67 75 69 64 65 | ttempts:.This.chapter.will.guide |
| 2460 | 20 79 6f 75 20 6f 6e 20 68 6f 77 20 74 6f 20 67 65 74 20 75 70 20 74 6f 20 73 70 65 65 64 20 71 | .you.on.how.to.get.up.to.speed.q |
| 2480 | 75 69 63 6b 6c 79 20 75 73 69 6e 67 20 79 6f 75 72 20 6e 65 77 20 56 79 4f 53 20 73 79 73 74 65 | uickly.using.your.new.VyOS.syste |
| 24a0 | 6d 2e 20 49 74 20 77 69 6c 6c 20 73 68 6f 77 20 79 6f 75 20 61 20 76 65 72 79 20 62 61 73 69 63 | m..It.will.show.you.a.very.basic |
| 24c0 | 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 65 78 61 6d 70 6c 65 20 74 68 61 74 20 77 69 6c 6c | .configuration.example.that.will |
| 24e0 | 20 70 72 6f 76 69 64 65 20 61 20 3a 72 65 66 3a 60 6e 61 74 60 20 67 61 74 65 77 61 79 20 66 6f | .provide.a.:ref:`nat`.gateway.fo |
| 2500 | 72 20 61 20 64 65 76 69 63 65 20 77 69 74 68 20 74 77 6f 20 6e 65 74 77 6f 72 6b 20 69 6e 74 65 | r.a.device.with.two.network.inte |
| 2520 | 72 66 61 63 65 73 20 28 60 60 65 74 68 30 60 60 20 61 6e 64 20 60 60 65 74 68 31 60 60 29 2e 00 | rfaces.(``eth0``.and.``eth1``).. |
| 2540 | 54 68 69 73 20 63 68 61 70 74 65 72 20 77 69 6c 6c 20 67 75 69 64 65 20 79 6f 75 20 6f 6e 20 68 | This.chapter.will.guide.you.on.h |
| 2560 | 6f 77 20 74 6f 20 67 65 74 20 75 70 20 74 6f 20 73 70 65 65 64 20 71 75 69 63 6b 6c 79 20 75 73 | ow.to.get.up.to.speed.quickly.us |
| 2580 | 69 6e 67 20 79 6f 75 72 20 6e 65 77 20 56 79 4f 53 20 73 79 73 74 65 6d 2e 20 49 74 20 77 69 6c | ing.your.new.VyOS.system..It.wil |
| 25a0 | 6c 20 73 68 6f 77 20 79 6f 75 20 61 20 76 65 72 79 20 62 61 73 69 63 20 63 6f 6e 66 69 67 75 72 | l.show.you.a.very.basic.configur |
| 25c0 | 61 74 69 6f 6e 20 65 78 61 6d 70 6c 65 20 74 68 61 74 20 77 69 6c 6c 20 70 72 6f 76 69 64 65 20 | ation.example.that.will.provide. |
| 25e0 | 61 20 3a 72 65 66 3a 60 6e 61 74 60 20 67 61 74 65 77 61 79 20 66 6f 72 20 61 20 64 65 76 69 63 | a.:ref:`nat`.gateway.for.a.devic |
| 2600 | 65 20 77 69 74 68 20 74 77 6f 20 6e 65 74 77 6f 72 6b 20 69 6e 74 65 72 66 61 63 65 73 20 28 60 | e.with.two.network.interfaces.(` |
| 2620 | 65 74 68 30 60 20 61 6e 64 20 60 65 74 68 31 60 29 2e 00 54 68 69 73 20 63 6f 6e 66 69 67 75 72 | eth0`.and.`eth1`)..This.configur |
| 2640 | 61 74 69 6f 6e 20 63 72 65 61 74 65 73 20 61 20 70 72 6f 70 65 72 20 73 74 61 74 65 66 75 6c 20 | ation.creates.a.proper.stateful. |
| 2660 | 66 69 72 65 77 61 6c 6c 20 74 68 61 74 20 62 6c 6f 63 6b 73 20 61 6c 6c 20 74 72 61 66 66 69 63 | firewall.that.blocks.all.traffic |
| 2680 | 20 77 68 69 63 68 20 77 61 73 20 6e 6f 74 20 69 6e 69 74 69 61 74 65 64 20 66 72 6f 6d 20 74 68 | .which.was.not.initiated.from.th |
| 26a0 | 65 20 69 6e 74 65 72 6e 61 6c 2f 4c 41 4e 20 73 69 64 65 20 66 69 72 73 74 2e 00 54 6f 20 6d 61 | e.internal/LAN.side.first..To.ma |
| 26c0 | 6b 65 20 66 69 72 65 77 61 6c 6c 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 65 61 73 69 65 72 | ke.firewall.configuration.easier |
| 26e0 | 2c 20 77 65 20 63 61 6e 20 63 72 65 61 74 65 20 67 72 6f 75 70 73 20 6f 66 20 69 6e 74 65 72 66 | ,.we.can.create.groups.of.interf |
| 2700 | 61 63 65 73 2c 20 6e 65 74 77 6f 72 6b 73 2c 20 61 64 64 72 65 73 73 65 73 2c 20 70 6f 72 74 73 | aces,.networks,.addresses,.ports |
| 2720 | 2c 20 61 6e 64 20 64 6f 6d 61 69 6e 73 20 74 68 61 74 20 64 65 73 63 72 69 62 65 20 64 69 66 66 | ,.and.domains.that.describe.diff |
| 2740 | 65 72 65 6e 74 20 70 61 72 74 73 20 6f 66 20 6f 75 72 20 6e 65 74 77 6f 72 6b 2e 20 57 65 20 63 | erent.parts.of.our.network..We.c |
| 2760 | 61 6e 20 74 68 65 6e 20 75 73 65 20 74 68 65 6d 20 66 6f 72 20 66 69 6c 74 65 72 69 6e 67 20 77 | an.then.use.them.for.filtering.w |
| 2780 | 69 74 68 69 6e 20 6f 75 72 20 66 69 72 65 77 61 6c 6c 20 72 75 6c 65 73 65 74 73 2c 20 61 6c 6c | ithin.our.firewall.rulesets,.all |
| 27a0 | 6f 77 69 6e 67 20 66 6f 72 20 6d 6f 72 65 20 63 6f 6e 63 69 73 65 20 61 6e 64 20 72 65 61 64 61 | owing.for.more.concise.and.reada |
| 27c0 | 62 6c 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 00 55 73 69 6e 67 20 6f 70 74 69 6f 6e 73 | ble.configuration..Using.options |
| 27e0 | 20 64 65 66 69 6e 65 64 20 69 6e 20 60 60 73 65 74 20 66 69 72 65 77 61 6c 6c 20 67 6c 6f 62 61 | .defined.in.``set.firewall.globa |
| 2800 | 6c 2d 6f 70 74 69 6f 6e 73 20 73 74 61 74 65 2d 70 6f 6c 69 63 79 60 60 2c 20 73 74 61 74 65 20 | l-options.state-policy``,.state. |
| 2820 | 70 6f 6c 69 63 79 20 72 75 6c 65 73 20 74 68 61 74 20 61 70 70 6c 69 65 73 20 66 6f 72 20 62 6f | policy.rules.that.applies.for.bo |
| 2840 | 74 68 20 49 50 76 34 20 61 6e 64 20 49 50 76 36 20 61 72 65 20 63 72 65 61 74 65 64 2e 20 54 68 | th.IPv4.and.IPv6.are.created..Th |
| 2860 | 65 73 65 20 67 6c 6f 62 61 6c 20 73 74 61 74 65 20 70 6f 6c 69 63 69 65 73 20 61 6c 73 6f 20 61 | ese.global.state.policies.also.a |
| 2880 | 70 70 6c 69 65 73 20 66 6f 72 20 61 6c 6c 20 74 72 61 66 66 69 63 20 74 68 61 74 20 70 61 73 73 | pplies.for.all.traffic.that.pass |
| 28a0 | 65 73 20 74 68 72 6f 75 67 68 20 74 68 65 20 72 6f 75 74 65 72 20 28 74 72 61 6e 73 69 74 29 20 | es.through.the.router.(transit). |
| 28c0 | 61 6e 64 20 66 6f 72 20 74 72 61 66 66 69 63 20 6f 72 69 67 69 6e 61 74 65 64 2f 64 65 73 74 69 | and.for.traffic.originated/desti |
| 28e0 | 6e 61 74 65 64 20 74 6f 2f 66 72 6f 6d 20 74 68 65 20 72 6f 75 74 65 72 20 69 74 73 65 6c 66 2c | nated.to/from.the.router.itself, |
| 2900 | 20 61 6e 64 20 77 69 6c 6c 20 62 65 20 61 76 61 6c 75 61 74 65 64 20 62 65 66 6f 72 65 20 61 6e | .and.will.be.avaluated.before.an |
| 2920 | 79 20 6f 74 68 65 72 20 72 75 6c 65 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 66 69 72 65 | y.other.rule.defined.in.the.fire |
| 2940 | 77 61 6c 6c 2e 00 55 73 69 6e 67 20 6f 70 74 69 6f 6e 73 20 64 65 66 69 6e 65 64 20 69 6e 20 60 | wall..Using.options.defined.in.` |
| 2960 | 60 73 65 74 20 66 69 72 65 77 61 6c 6c 20 67 6c 6f 62 61 6c 2d 6f 70 74 69 6f 6e 73 20 73 74 61 | `set.firewall.global-options.sta |
| 2980 | 74 65 2d 70 6f 6c 69 63 79 60 60 2c 20 73 74 61 74 65 20 70 6f 6c 69 63 79 20 72 75 6c 65 73 20 | te-policy``,.state.policy.rules. |
| 29a0 | 74 68 61 74 20 61 70 70 6c 69 65 73 20 66 6f 72 20 62 6f 74 68 20 49 50 76 34 20 61 6e 64 20 49 | that.applies.for.both.IPv4.and.I |
| 29c0 | 50 76 36 20 61 72 65 20 63 72 65 61 74 65 64 2e 20 54 68 65 73 65 20 67 6c 6f 62 61 6c 20 73 74 | Pv6.are.created..These.global.st |
| 29e0 | 61 74 65 20 70 6f 6c 69 63 69 65 73 20 61 6c 73 6f 20 61 70 70 6c 69 65 73 20 66 6f 72 20 61 6c | ate.policies.also.applies.for.al |
| 2a00 | 6c 20 74 72 61 66 66 69 63 20 74 68 61 74 20 70 61 73 73 65 73 20 74 68 72 6f 75 67 68 20 74 68 | l.traffic.that.passes.through.th |
| 2a20 | 65 20 72 6f 75 74 65 72 20 28 74 72 61 6e 73 69 74 29 20 61 6e 64 20 66 6f 72 20 74 72 61 66 66 | e.router.(transit).and.for.traff |
| 2a40 | 69 63 20 6f 72 69 67 69 6e 61 74 65 64 2f 64 65 73 74 69 6e 61 74 65 64 20 74 6f 2f 66 72 6f 6d | ic.originated/destinated.to/from |
| 2a60 | 20 74 68 65 20 72 6f 75 74 65 72 20 69 74 73 65 6c 66 2c 20 61 6e 64 20 77 69 6c 6c 20 62 65 20 | .the.router.itself,.and.will.be. |
| 2a80 | 65 76 61 6c 75 61 74 65 64 20 62 65 66 6f 72 65 20 61 6e 79 20 6f 74 68 65 72 20 72 75 6c 65 20 | evaluated.before.any.other.rule. |
| 2aa0 | 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 66 69 72 65 77 61 6c 6c 2e 00 56 79 4f 53 20 77 69 | defined.in.the.firewall..VyOS.wi |
| 2ac0 | 6c 6c 20 73 65 72 76 65 20 61 73 20 61 20 66 75 6c 6c 20 44 4e 53 20 72 65 63 75 72 73 6f 72 2c | ll.serve.as.a.full.DNS.recursor, |
| 2ae0 | 20 72 65 70 6c 61 63 69 6e 67 20 74 68 65 20 6e 65 65 64 20 74 6f 20 75 74 69 6c 69 7a 65 20 47 | .replacing.the.need.to.utilize.G |
| 2b00 | 6f 6f 67 6c 65 2c 20 43 6c 6f 75 64 66 6c 61 72 65 2c 20 6f 72 20 6f 74 68 65 72 20 70 75 62 6c | oogle,.Cloudflare,.or.other.publ |
| 2b20 | 69 63 20 44 4e 53 20 73 65 72 76 65 72 73 20 28 77 68 69 63 68 20 69 73 20 67 6f 6f 64 20 66 6f | ic.DNS.servers.(which.is.good.fo |
| 2b40 | 72 20 70 72 69 76 61 63 79 29 00 57 65 20 63 61 6e 20 63 72 65 61 74 65 20 61 20 63 6f 6d 6d 6f | r.privacy).We.can.create.a.commo |
| 2b60 | 6e 20 63 68 61 69 6e 20 66 6f 72 20 73 74 61 74 65 66 75 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 | n.chain.for.stateful.connection. |
| 2b80 | 66 69 6c 74 65 72 69 6e 67 20 6f 66 20 6d 75 6c 74 69 70 6c 65 20 69 6e 74 65 72 66 61 63 65 73 | filtering.of.multiple.interfaces |
| 2ba0 | 20 28 6f 72 20 6d 75 6c 74 69 70 6c 65 20 6e 65 74 66 69 6c 74 65 72 20 68 6f 6f 6b 73 20 6f 6e | .(or.multiple.netfilter.hooks.on |
| 2bc0 | 20 6f 6e 65 20 69 6e 74 65 72 66 61 63 65 29 2e 20 54 68 6f 73 65 20 69 6e 64 69 76 69 64 75 61 | .one.interface)..Those.individua |
| 2be0 | 6c 20 63 68 61 69 6e 73 20 63 61 6e 20 74 68 65 6e 20 6a 75 6d 70 20 74 6f 20 74 68 65 20 63 6f | l.chains.can.then.jump.to.the.co |
| 2c00 | 6d 6d 6f 6e 20 63 68 61 69 6e 20 66 6f 72 20 73 74 61 74 65 66 75 6c 20 63 6f 6e 6e 65 63 74 69 | mmon.chain.for.stateful.connecti |
| 2c20 | 6f 6e 20 66 69 6c 74 65 72 69 6e 67 2c 20 72 65 74 75 72 6e 69 6e 67 20 74 6f 20 74 68 65 20 6f | on.filtering,.returning.to.the.o |
| 2c40 | 72 69 67 69 6e 61 6c 20 63 68 61 69 6e 20 66 6f 72 20 66 75 72 74 68 65 72 20 72 75 6c 65 20 70 | riginal.chain.for.further.rule.p |
| 2c60 | 72 6f 63 65 73 73 69 6e 67 20 69 66 20 6e 6f 20 61 63 74 69 6f 6e 20 69 73 20 74 61 6b 65 6e 20 | rocessing.if.no.action.is.taken. |
| 2c80 | 6f 6e 20 74 68 65 20 70 61 63 6b 65 74 2e 00 57 65 20 63 61 6e 20 6e 6f 77 20 63 6f 6e 66 69 67 | on.the.packet..We.can.now.config |
| 2ca0 | 75 72 65 20 61 63 63 65 73 73 20 74 6f 20 74 68 65 20 72 6f 75 74 65 72 20 69 74 73 65 6c 66 2c | ure.access.to.the.router.itself, |
| 2cc0 | 20 61 6c 6c 6f 77 69 6e 67 20 53 53 48 20 61 63 63 65 73 73 20 66 72 6f 6d 20 74 68 65 20 69 6e | .allowing.SSH.access.from.the.in |
| 2ce0 | 73 69 64 65 2f 4c 41 4e 20 6e 65 74 77 6f 72 6b 20 61 6e 64 20 72 61 74 65 20 6c 69 6d 69 74 69 | side/LAN.network.and.rate.limiti |
| 2d00 | 6e 67 20 53 53 48 20 61 63 63 65 73 73 20 66 72 6f 6d 20 74 68 65 20 6f 75 74 73 69 64 65 2f 57 | ng.SSH.access.from.the.outside/W |
| 2d20 | 41 4e 20 6e 65 74 77 6f 72 6b 2e 00 57 65 20 73 68 6f 75 6c 64 20 61 6c 73 6f 20 62 6c 6f 63 6b | AN.network..We.should.also.block |
| 2d40 | 20 61 6c 6c 20 74 72 61 66 66 69 63 20 64 65 73 74 69 6e 61 74 65 64 20 74 6f 20 74 68 65 20 72 | .all.traffic.destinated.to.the.r |
| 2d60 | 6f 75 74 65 72 20 69 74 73 65 6c 66 20 74 68 61 74 20 69 73 6e 27 74 20 65 78 70 6c 69 63 69 74 | outer.itself.that.isn't.explicit |
| 2d80 | 6c 79 20 61 6c 6c 6f 77 65 64 20 61 74 20 73 6f 6d 65 20 70 6f 69 6e 74 20 69 6e 20 74 68 65 20 | ly.allowed.at.some.point.in.the. |
| 2da0 | 63 68 61 69 6e 20 66 6f 72 20 74 68 65 20 60 60 69 6e 70 75 74 60 60 20 68 6f 6f 6b 2e 20 41 73 | chain.for.the.``input``.hook..As |
| 2dc0 | 20 77 65 27 76 65 20 61 6c 72 65 61 64 79 20 63 6f 6e 66 69 67 75 72 65 64 20 73 74 61 74 65 66 | .we've.already.configured.statef |
| 2de0 | 75 6c 20 70 61 63 6b 65 74 20 66 69 6c 74 65 72 69 6e 67 20 61 62 6f 76 65 2c 20 77 65 20 6f 6e | ul.packet.filtering.above,.we.on |
| 2e00 | 6c 79 20 6e 65 65 64 20 74 6f 20 73 65 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 61 63 74 69 6f | ly.need.to.set.the.default.actio |
| 2e20 | 6e 20 74 6f 20 60 60 64 72 6f 70 60 60 3a 00 57 69 74 68 20 74 68 65 20 6e 65 77 20 66 69 72 65 | n.to.``drop``:.With.the.new.fire |
| 2e40 | 77 61 6c 6c 20 73 74 72 75 63 74 75 72 65 2c 20 77 65 20 68 61 76 65 20 68 61 76 65 20 61 20 6c | wall.structure,.we.have.have.a.l |
| 2e60 | 6f 74 20 6f 66 20 66 6c 65 78 69 62 69 6c 69 74 79 20 69 6e 20 68 6f 77 20 77 65 20 67 72 6f 75 | ot.of.flexibility.in.how.we.grou |
| 2e80 | 70 20 61 6e 64 20 6f 72 64 65 72 20 6f 75 72 20 72 75 6c 65 73 2c 20 61 73 20 73 68 6f 77 6e 20 | p.and.order.our.rules,.as.shown. |
| 2ea0 | 62 79 20 74 68 65 20 74 68 72 65 65 20 61 6c 74 65 72 6e 61 74 69 76 65 20 61 70 70 72 6f 61 63 | by.the.three.alternative.approac |
| 2ec0 | 68 65 73 20 62 65 6c 6f 77 2e 00 57 69 74 68 20 74 68 65 20 6e 65 77 20 66 69 72 65 77 61 6c 6c | hes.below..With.the.new.firewall |
| 2ee0 | 20 73 74 72 75 63 74 75 72 65 2c 20 77 65 20 68 61 76 65 20 68 61 76 65 20 61 20 6c 6f 74 20 6f | .structure,.we.have.have.a.lot.o |
| 2f00 | 66 20 66 6c 65 78 69 62 69 6c 69 74 79 20 69 6e 20 68 6f 77 20 77 65 20 67 72 6f 75 70 20 61 6e | f.flexibility.in.how.we.group.an |
| 2f20 | 64 20 6f 72 64 65 72 20 6f 75 72 20 72 75 6c 65 73 2c 20 61 73 20 73 68 6f 77 6e 20 62 79 20 74 | d.order.our.rules,.as.shown.by.t |
| 2f40 | 68 65 20 74 77 6f 20 61 6c 74 65 72 6e 61 74 69 76 65 20 61 70 70 72 6f 61 63 68 65 73 20 62 65 | he.two.alternative.approaches.be |
| 2f60 | 6c 6f 77 2e 00 59 6f 75 20 6e 6f 77 20 73 68 6f 75 6c 64 20 68 61 76 65 20 61 20 73 69 6d 70 6c | low..You.now.should.have.a.simpl |
| 2f80 | 65 20 79 65 74 20 73 65 63 75 72 65 20 61 6e 64 20 66 75 6e 63 74 69 6f 6e 69 6e 67 20 72 6f 75 | e.yet.secure.and.functioning.rou |
| 2fa0 | 74 65 72 20 74 6f 20 65 78 70 65 72 69 6d 65 6e 74 20 77 69 74 68 20 66 75 72 74 68 65 72 2e 20 | ter.to.experiment.with.further.. |
| 2fc0 | 45 6e 6a 6f 79 21 00 59 6f 75 72 20 69 6e 74 65 72 6e 61 6c 2f 4c 41 4e 20 69 6e 74 65 72 66 61 | Enjoy!.Your.internal/LAN.interfa |
| 2fe0 | 63 65 20 77 69 6c 6c 20 62 65 20 60 60 65 74 68 31 60 60 2e 20 49 74 20 77 69 6c 6c 20 75 73 65 | ce.will.be.``eth1``..It.will.use |
| 3000 | 20 61 20 73 74 61 74 69 63 20 49 50 20 61 64 64 72 65 73 73 20 6f 66 20 60 60 31 39 32 2e 31 36 | .a.static.IP.address.of.``192.16 |
| 3020 | 38 2e 30 2e 31 2f 32 34 60 60 2e 00 59 6f 75 72 20 69 6e 74 65 72 6e 61 6c 2f 4c 41 4e 20 69 6e | 8.0.1/24``..Your.internal/LAN.in |
| 3040 | 74 65 72 66 61 63 65 20 77 69 6c 6c 20 62 65 20 60 65 74 68 31 60 2e 20 49 74 20 77 69 6c 6c 20 | terface.will.be.`eth1`..It.will. |
| 3060 | 75 73 65 20 61 20 73 74 61 74 69 63 20 49 50 20 61 64 64 72 65 73 73 20 6f 66 20 60 31 39 32 2e | use.a.static.IP.address.of.`192. |
| 3080 | 31 36 38 2e 30 2e 31 2f 32 34 60 2e 00 59 6f 75 72 20 6f 75 74 73 69 64 65 2f 57 41 4e 20 69 6e | 168.0.1/24`..Your.outside/WAN.in |
| 30a0 | 74 65 72 66 61 63 65 20 77 69 6c 6c 20 62 65 20 60 60 65 74 68 30 60 60 2e 20 49 74 20 77 69 6c | terface.will.be.``eth0``..It.wil |
| 30c0 | 6c 20 72 65 63 65 69 76 65 20 69 74 73 20 69 6e 74 65 72 66 61 63 65 20 61 64 64 72 65 73 73 20 | l.receive.its.interface.address. |
| 30e0 | 76 69 61 20 44 48 43 50 2e 00 59 6f 75 72 20 6f 75 74 73 69 64 65 2f 57 41 4e 20 69 6e 74 65 72 | via.DHCP..Your.outside/WAN.inter |
| 3100 | 66 61 63 65 20 77 69 6c 6c 20 62 65 20 60 65 74 68 30 60 2e 20 49 74 20 77 69 6c 6c 20 72 65 63 | face.will.be.`eth0`..It.will.rec |
| 3120 | 65 69 76 65 20 69 74 73 20 69 6e 74 65 72 66 61 63 65 20 61 64 64 72 65 73 73 20 76 69 61 20 44 | eive.its.interface.address.via.D |
| 3140 | 48 43 50 2e 00 4d 49 4d 45 2d 56 65 72 73 69 6f 6e 3a 20 31 2e 30 0a 43 6f 6e 74 65 6e 74 2d 54 | HCP..MIME-Version:.1.0.Content-T |
| 3160 | 79 70 65 3a 20 74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 55 54 46 2d 38 0a 43 | ype:.text/plain;.charset=UTF-8.C |
| 3180 | 6f 6e 74 65 6e 74 2d 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 69 6e 67 3a 20 38 62 69 74 0a 58 | ontent-Transfer-Encoding:.8bit.X |
| 31a0 | 2d 47 65 6e 65 72 61 74 6f 72 3a 20 4c 6f 63 61 6c 61 7a 79 20 28 68 74 74 70 73 3a 2f 2f 6c 6f | -Generator:.Localazy.(https://lo |
| 31c0 | 63 61 6c 61 7a 79 2e 63 6f 6d 29 0a 50 72 6f 6a 65 63 74 2d 49 64 2d 56 65 72 73 69 6f 6e 3a 20 | calazy.com).Project-Id-Version:. |
| 31e0 | 0a 4c 61 6e 67 75 61 67 65 3a 20 65 6e 0a 50 6c 75 72 61 6c 2d 46 6f 72 6d 73 3a 20 6e 70 6c 75 | .Language:.en.Plural-Forms:.nplu |
| 3200 | 72 61 6c 73 3d 32 3b 20 70 6c 75 72 61 6c 3d 28 6e 3d 3d 31 29 20 3f 20 30 20 3a 20 31 3b 0a 00 | rals=2;.plural=(n==1).?.0.:.1;.. |
| 3220 | 41 20 64 65 66 61 75 6c 74 20 61 63 74 69 6f 6e 20 6f 66 20 60 60 72 65 74 75 72 6e 60 60 2c 20 | A.default.action.of.``return``,. |
| 3240 | 77 68 69 63 68 20 72 65 74 75 72 6e 73 20 74 68 65 20 70 61 63 6b 65 74 20 62 61 63 6b 20 74 6f | which.returns.the.packet.back.to |
| 3260 | 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 63 68 61 69 6e 20 69 66 20 6e 6f 20 61 63 74 69 6f 6e | .the.original.chain.if.no.action |
| 3280 | 20 69 73 20 74 61 6b 65 6e 2e 00 41 20 6e 65 77 20 66 69 72 65 77 61 6c 6c 20 73 74 72 75 63 74 | .is.taken..A.new.firewall.struct |
| 32a0 | 75 72 65 e2 80 94 77 68 69 63 68 20 75 73 65 73 20 74 68 65 20 60 60 6e 66 74 61 62 6c 65 73 60 | ure...which.uses.the.``nftables` |
| 32c0 | 60 20 62 61 63 6b 65 6e 64 2c 20 72 61 74 68 65 72 20 74 68 61 6e 20 60 60 69 70 74 61 62 6c 65 | `.backend,.rather.than.``iptable |
| 32e0 | 73 60 60 e2 80 94 69 73 20 61 76 61 69 6c 61 62 6c 65 20 6f 6e 20 61 6c 6c 20 69 6e 73 74 61 6c | s``...is.available.on.all.instal |
| 3300 | 6c 61 74 69 6f 6e 73 20 73 74 61 72 74 69 6e 67 20 66 72 6f 6d 20 56 79 4f 53 20 60 60 31 2e 34 | lations.starting.from.VyOS.``1.4 |
| 3320 | 2d 72 6f 6c 6c 69 6e 67 2d 32 30 32 33 30 38 30 34 30 35 35 37 60 60 2e 20 54 68 65 20 66 69 72 | -rolling-202308040557``..The.fir |
| 3340 | 65 77 61 6c 6c 20 73 75 70 70 6f 72 74 73 20 63 72 65 61 74 69 6f 6e 20 6f 66 20 64 69 73 74 69 | ewall.supports.creation.of.disti |
| 3360 | 6e 63 74 2c 20 69 6e 74 65 72 6c 69 6e 6b 65 64 20 63 68 61 69 6e 73 20 66 6f 72 20 65 61 63 68 | nct,.interlinked.chains.for.each |
| 3380 | 20 60 4e 65 74 66 69 6c 74 65 72 20 68 6f 6f 6b 20 3c 68 74 74 70 73 3a 2f 2f 77 69 6b 69 2e 6e | .`Netfilter.hook.<https://wiki.n |
| 33a0 | 66 74 61 62 6c 65 73 2e 6f 72 67 2f 77 69 6b 69 2d 6e 66 74 61 62 6c 65 73 2f 69 6e 64 65 78 2e | ftables.org/wiki-nftables/index. |
| 33c0 | 70 68 70 2f 4e 65 74 66 69 6c 74 65 72 5f 68 6f 6f 6b 73 3e 60 5f 20 61 6e 64 20 61 6c 6c 6f 77 | php/Netfilter_hooks>`_.and.allow |
| 33e0 | 73 20 66 6f 72 20 6d 6f 72 65 20 67 72 61 6e 75 6c 61 72 20 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 | s.for.more.granular.control.over |
| 3400 | 20 74 68 65 20 70 61 63 6b 65 74 20 66 69 6c 74 65 72 69 6e 67 20 70 72 6f 63 65 73 73 2e 00 41 | .the.packet.filtering.process..A |
| 3420 | 20 72 75 6c 65 20 74 6f 20 60 60 61 63 63 65 70 74 60 60 20 70 61 63 6b 65 74 73 20 66 72 6f 6d | .rule.to.``accept``.packets.from |
| 3440 | 20 65 73 74 61 62 6c 69 73 68 65 64 20 61 6e 64 20 72 65 6c 61 74 65 64 20 63 6f 6e 6e 65 63 74 | .established.and.related.connect |
| 3460 | 69 6f 6e 73 2e 00 41 20 72 75 6c 65 20 74 6f 20 60 60 64 72 6f 70 60 60 20 70 61 63 6b 65 74 73 | ions..A.rule.to.``drop``.packets |
| 3480 | 20 66 72 6f 6d 20 69 6e 76 61 6c 69 64 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 00 41 64 64 20 61 | .from.invalid.connections..Add.a |
| 34a0 | 20 73 65 74 20 6f 66 20 66 69 72 65 77 61 6c 6c 20 70 6f 6c 69 63 69 65 73 20 66 6f 72 20 6f 75 | .set.of.firewall.policies.for.ou |
| 34c0 | 72 20 6f 75 74 73 69 64 65 2f 57 41 4e 20 69 6e 74 65 72 66 61 63 65 2e 00 41 66 74 65 72 20 65 | r.outside/WAN.interface..After.e |
| 34e0 | 76 65 72 79 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 63 68 61 6e 67 65 2c 20 79 6f 75 20 6e | very.configuration.change,.you.n |
| 3500 | 65 65 64 20 74 6f 20 61 70 70 6c 79 20 74 68 65 20 63 68 61 6e 67 65 73 20 62 79 20 75 73 69 6e | eed.to.apply.the.changes.by.usin |
| 3520 | 67 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6d 6d 61 6e 64 3a 00 41 66 74 65 72 20 73 | g.the.following.command:.After.s |
| 3540 | 77 69 74 63 68 69 6e 67 20 74 6f 20 3a 72 65 66 3a 60 71 75 69 63 6b 2d 73 74 61 72 74 2d 63 6f | witching.to.:ref:`quick-start-co |
| 3560 | 6e 66 69 67 75 72 61 74 69 6f 6e 2d 6d 6f 64 65 60 20 69 73 73 75 65 20 74 68 65 20 66 6f 6c 6c | nfiguration-mode`.issue.the.foll |
| 3580 | 6f 77 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 2c 20 61 6e 64 20 79 6f 75 72 20 73 79 73 74 65 6d 20 | owing.commands,.and.your.system. |
| 35a0 | 77 69 6c 6c 20 6c 69 73 74 65 6e 20 6f 6e 20 65 76 65 72 79 20 69 6e 74 65 72 66 61 63 65 20 66 | will.listen.on.every.interface.f |
| 35c0 | 6f 72 20 69 6e 63 6f 6d 69 6e 67 20 53 53 48 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2e 20 59 6f 75 | or.incoming.SSH.connections..You |
| 35e0 | 20 6d 69 67 68 74 20 77 61 6e 74 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 3a 72 65 66 3a 60 73 | .might.want.to.check.the.:ref:`s |
| 3600 | 73 68 60 20 63 68 61 70 74 65 72 20 6f 6e 20 68 6f 77 20 74 6f 20 6c 69 73 74 65 6e 20 6f 6e 20 | sh`.chapter.on.how.to.listen.on. |
| 3620 | 73 70 65 63 69 66 69 63 20 61 64 64 72 65 73 73 65 73 20 6f 6e 6c 79 2e 00 41 66 74 65 72 20 73 | specific.addresses.only..After.s |
| 3640 | 77 69 74 63 68 69 6e 67 20 74 6f 20 3a 72 65 66 3a 60 71 75 69 63 6b 2d 73 74 61 72 74 2d 63 6f | witching.to.:ref:`quick-start-co |
| 3660 | 6e 66 69 67 75 72 61 74 69 6f 6e 2d 6d 6f 64 65 60 20 69 73 73 75 65 20 74 68 65 20 66 6f 6c 6c | nfiguration-mode`.issue.the.foll |
| 3680 | 6f 77 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 3a 00 41 6c 6c 6f 77 20 41 63 63 65 73 73 20 74 6f 20 | owing.commands:.Allow.Access.to. |
| 36a0 | 53 65 72 76 69 63 65 73 00 41 6c 6c 6f 77 20 4d 61 6e 61 67 65 6d 65 6e 74 20 41 63 63 65 73 73 | Services.Allow.Management.Access |
| 36c0 | 00 41 6c 74 65 72 6e 61 74 69 76 65 6c 79 2c 20 69 6e 73 74 65 61 64 20 6f 66 20 63 6f 6e 66 69 | .Alternatively,.instead.of.confi |
| 36e0 | 67 75 72 69 6e 67 20 74 68 65 20 60 60 43 4f 4e 4e 5f 46 49 4c 54 45 52 60 60 20 63 68 61 69 6e | guring.the.``CONN_FILTER``.chain |
| 3700 | 20 64 65 73 63 72 69 62 65 64 20 61 62 6f 76 65 2c 20 79 6f 75 20 63 61 6e 20 74 61 6b 65 20 74 | .described.above,.you.can.take.t |
| 3720 | 68 65 20 6d 6f 72 65 20 74 72 61 64 69 74 69 6f 6e 61 6c 20 73 74 61 74 65 66 75 6c 20 63 6f 6e | he.more.traditional.stateful.con |
| 3740 | 6e 65 63 74 69 6f 6e 20 66 69 6c 74 65 72 69 6e 67 20 61 70 70 72 6f 61 63 68 20 62 79 20 63 72 | nection.filtering.approach.by.cr |
| 3760 | 65 61 74 69 6e 67 20 72 75 6c 65 73 20 6f 6e 20 65 61 63 68 20 68 6f 6f 6b 27 73 20 63 68 61 69 | eating.rules.on.each.hook's.chai |
| 3780 | 6e 3a 00 41 6c 74 65 72 6e 61 74 69 76 65 6c 79 2c 20 79 6f 75 20 63 61 6e 20 74 61 6b 65 20 74 | n:.Alternatively,.you.can.take.t |
| 37a0 | 68 65 20 6d 6f 72 65 20 74 72 61 64 69 74 69 6f 6e 61 6c 20 73 74 61 74 65 66 75 6c 20 63 6f 6e | he.more.traditional.stateful.con |
| 37c0 | 6e 65 63 74 69 6f 6e 20 66 69 6c 74 65 72 69 6e 67 20 61 70 70 72 6f 61 63 68 20 62 79 20 63 72 | nection.filtering.approach.by.cr |
| 37e0 | 65 61 74 69 6e 67 20 72 75 6c 65 73 20 6f 6e 20 65 61 63 68 20 62 61 73 65 20 68 6f 6f 6b 27 73 | eating.rules.on.each.base.hook's |
| 3800 | 20 63 68 61 69 6e 3a 00 41 70 70 6c 79 20 74 68 65 20 66 69 72 65 77 61 6c 6c 20 70 6f 6c 69 63 | .chain:.Apply.the.firewall.polic |
| 3820 | 69 65 73 3a 00 41 73 20 61 62 6f 76 65 2c 20 63 6f 6d 6d 69 74 20 79 6f 75 72 20 63 68 61 6e 67 | ies:.As.above,.commit.your.chang |
| 3840 | 65 73 2c 20 73 61 76 65 20 74 68 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2c 20 61 6e 64 20 | es,.save.the.configuration,.and. |
| 3860 | 65 78 69 74 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6d 6f 64 65 3a 00 42 6c 6f 63 6b 20 49 | exit.configuration.mode:.Block.I |
| 3880 | 6e 63 6f 6d 69 6e 67 20 54 72 61 66 66 69 63 00 42 79 20 64 65 66 61 75 6c 74 2c 20 56 79 4f 53 | ncoming.Traffic.By.default,.VyOS |
| 38a0 | 20 69 73 20 69 6e 20 6f 70 65 72 61 74 69 6f 6e 61 6c 20 6d 6f 64 65 2c 20 61 6e 64 20 74 68 65 | .is.in.operational.mode,.and.the |
| 38c0 | 20 63 6f 6d 6d 61 6e 64 20 70 72 6f 6d 70 74 20 64 69 73 70 6c 61 79 73 20 61 20 60 24 60 2e 20 | .command.prompt.displays.a.`$`.. |
| 38e0 | 54 6f 20 63 6f 6e 66 69 67 75 72 65 20 56 79 4f 53 2c 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 | To.configure.VyOS,.you.will.need |
| 3900 | 20 74 6f 20 65 6e 74 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6d 6f 64 65 2c 20 72 65 | .to.enter.configuration.mode,.re |
| 3920 | 73 75 6c 74 69 6e 67 20 69 6e 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 70 72 6f 6d 70 74 20 64 69 | sulting.in.the.command.prompt.di |
| 3940 | 73 70 6c 61 79 69 6e 67 20 61 20 60 23 60 2c 20 61 73 20 64 65 6d 6f 6e 73 74 72 61 74 65 64 20 | splaying.a.`#`,.as.demonstrated. |
| 3960 | 62 65 6c 6f 77 3a 00 42 79 20 64 65 66 61 75 6c 74 2c 20 56 79 4f 53 20 69 73 20 69 6e 20 6f 70 | below:.By.default,.VyOS.is.in.op |
| 3980 | 65 72 61 74 69 6f 6e 61 6c 20 6d 6f 64 65 2c 20 61 6e 64 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 | erational.mode,.and.the.command. |
| 39a0 | 70 72 6f 6d 70 74 20 64 69 73 70 6c 61 79 73 20 61 20 60 60 24 60 60 2e 20 54 6f 20 63 6f 6e 66 | prompt.displays.a.``$``..To.conf |
| 39c0 | 69 67 75 72 65 20 56 79 4f 53 2c 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 20 74 6f 20 65 6e 74 | igure.VyOS,.you.will.need.to.ent |
| 39e0 | 65 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6d 6f 64 65 2c 20 72 65 73 75 6c 74 69 6e 67 | er.configuration.mode,.resulting |
| 3a00 | 20 69 6e 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 70 72 6f 6d 70 74 20 64 69 73 70 6c 61 79 69 6e | .in.the.command.prompt.displayin |
| 3a20 | 67 20 61 20 60 60 23 60 60 2c 20 61 73 20 64 65 6d 6f 6e 73 74 72 61 74 65 64 20 62 65 6c 6f 77 | g.a.``#``,.as.demonstrated.below |
| 3a40 | 3a 00 43 6f 6d 6d 69 74 20 61 6e 64 20 53 61 76 65 00 43 6f 6d 6d 69 74 20 63 68 61 6e 67 65 73 | :.Commit.and.Save.Commit.changes |
| 3a60 | 2c 20 73 61 76 65 20 74 68 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2c 20 61 6e 64 20 65 78 | ,.save.the.configuration,.and.ex |
| 3a80 | 69 74 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6d 6f 64 65 3a 00 43 6f 6e 66 69 67 75 72 61 | it.configuration.mode:.Configura |
| 3aa0 | 74 69 6f 6e 20 4d 6f 64 65 00 43 6f 6e 66 69 67 75 72 65 20 46 69 72 65 77 61 6c 6c 20 47 72 6f | tion.Mode.Configure.Firewall.Gro |
| 3ac0 | 75 70 73 00 43 6f 6e 66 69 67 75 72 65 20 53 74 61 74 65 66 75 6c 20 50 61 63 6b 65 74 20 46 69 | ups.Configure.Stateful.Packet.Fi |
| 3ae0 | 6c 74 65 72 69 6e 67 00 43 6f 6e 66 69 67 75 72 65 20 61 20 72 75 6c 65 20 6f 6e 20 74 68 65 20 | ltering.Configure.a.rule.on.the. |
| 3b00 | 60 60 69 6e 70 75 74 60 60 20 68 6f 6f 6b 20 66 69 6c 74 65 72 20 74 6f 20 6a 75 6d 70 20 74 6f | ``input``.hook.filter.to.jump.to |
| 3b20 | 20 74 68 65 20 60 60 56 79 4f 53 5f 4d 41 4e 41 47 45 4d 45 4e 54 60 60 20 63 68 61 69 6e 20 77 | .the.``VyOS_MANAGEMENT``.chain.w |
| 3b40 | 68 65 6e 20 6e 65 77 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 61 72 65 20 61 64 64 72 65 73 73 65 | hen.new.connections.are.addresse |
| 3b60 | 64 20 74 6f 20 70 6f 72 74 20 32 32 20 28 53 53 48 29 20 6f 6e 20 74 68 65 20 72 6f 75 74 65 72 | d.to.port.22.(SSH).on.the.router |
| 3b80 | 20 69 74 73 65 6c 66 3a 00 43 72 65 61 74 65 20 61 20 6e 65 77 20 63 68 61 69 6e 20 28 60 60 4f | .itself:.Create.a.new.chain.(``O |
| 3ba0 | 55 54 53 49 44 45 2d 49 4e 60 60 29 20 77 68 69 63 68 20 77 69 6c 6c 20 64 72 6f 70 20 61 6c 6c | UTSIDE-IN``).which.will.drop.all |
| 3bc0 | 20 74 72 61 66 66 69 63 20 74 68 61 74 20 69 73 20 6e 6f 74 20 65 78 70 6c 69 63 69 74 6c 79 20 | .traffic.that.is.not.explicitly. |
| 3be0 | 61 6c 6c 6f 77 65 64 20 61 74 20 73 6f 6d 65 20 70 6f 69 6e 74 20 69 6e 20 74 68 65 20 63 68 61 | allowed.at.some.point.in.the.cha |
| 3c00 | 69 6e 2e 20 54 68 65 6e 2c 20 77 65 20 63 61 6e 20 6a 75 6d 70 20 74 6f 20 74 68 61 74 20 63 68 | in..Then,.we.can.jump.to.that.ch |
| 3c20 | 61 69 6e 20 66 72 6f 6d 20 74 68 65 20 60 60 66 6f 72 77 61 72 64 60 60 20 68 6f 6f 6b 20 77 68 | ain.from.the.``forward``.hook.wh |
| 3c40 | 65 6e 20 74 72 61 66 66 69 63 20 69 73 20 63 6f 6d 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 60 60 | en.traffic.is.coming.from.the.`` |
| 3c60 | 57 41 4e 60 60 20 69 6e 74 65 72 66 61 63 65 20 67 72 6f 75 70 20 61 6e 64 20 69 73 20 61 64 64 | WAN``.interface.group.and.is.add |
| 3c80 | 72 65 73 73 65 64 20 74 6f 20 6f 75 72 20 6c 6f 63 61 6c 20 6e 65 74 77 6f 72 6b 2e 00 43 72 65 | ressed.to.our.local.network..Cre |
| 3ca0 | 61 74 65 20 61 20 6e 65 77 20 63 68 61 69 6e 20 28 60 60 4f 55 54 53 49 44 45 2d 49 4e 60 60 29 | ate.a.new.chain.(``OUTSIDE-IN``) |
| 3cc0 | 20 77 68 69 63 68 20 77 69 6c 6c 20 64 72 6f 70 20 61 6c 6c 20 74 72 61 66 66 69 63 20 74 68 61 | .which.will.drop.all.traffic.tha |
| 3ce0 | 74 20 69 73 20 6e 6f 74 20 65 78 70 6c 69 63 69 74 79 20 61 6c 6c 6f 77 65 64 20 61 74 20 73 6f | t.is.not.explicity.allowed.at.so |
| 3d00 | 6d 65 20 70 6f 69 6e 74 20 69 6e 20 74 68 65 20 63 68 61 69 6e 2e 20 54 68 65 6e 2c 20 77 65 20 | me.point.in.the.chain..Then,.we. |
| 3d20 | 63 61 6e 20 6a 75 6d 70 20 74 6f 20 74 68 61 74 20 63 68 61 69 6e 20 66 72 6f 6d 20 74 68 65 20 | can.jump.to.that.chain.from.the. |
| 3d40 | 60 60 66 6f 72 77 61 72 64 60 60 20 68 6f 6f 6b 20 77 68 65 6e 20 74 72 61 66 66 69 63 20 69 73 | ``forward``.hook.when.traffic.is |
| 3d60 | 20 63 6f 6d 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 60 60 57 41 4e 60 60 20 69 6e 74 65 72 66 61 | .coming.from.the.``WAN``.interfa |
| 3d80 | 63 65 20 67 72 6f 75 70 20 61 6e 64 20 69 73 20 61 64 64 72 65 73 73 65 64 20 74 6f 20 6f 75 72 | ce.group.and.is.addressed.to.our |
| 3da0 | 20 6c 6f 63 61 6c 20 6e 65 74 77 6f 72 6b 2e 00 44 48 43 50 20 63 6c 69 65 6e 74 73 20 77 69 6c | .local.network..DHCP.clients.wil |
| 3dc0 | 6c 20 62 65 20 61 73 73 69 67 6e 65 64 20 49 50 20 61 64 64 72 65 73 73 65 73 20 77 69 74 68 69 | l.be.assigned.IP.addresses.withi |
| 3de0 | 6e 20 74 68 65 20 72 61 6e 67 65 20 6f 66 20 60 31 39 32 2e 31 36 38 2e 30 2e 39 20 2d 20 31 39 | n.the.range.of.`192.168.0.9.-.19 |
| 3e00 | 32 2e 31 36 38 2e 30 2e 32 35 34 60 20 61 6e 64 20 68 61 76 65 20 61 20 64 6f 6d 61 69 6e 20 6e | 2.168.0.254`.and.have.a.domain.n |
| 3e20 | 61 6d 65 20 6f 66 20 60 69 6e 74 65 72 6e 61 6c 2d 6e 65 74 77 6f 72 6b 60 00 44 48 43 50 20 63 | ame.of.`internal-network`.DHCP.c |
| 3e40 | 6c 69 65 6e 74 73 20 77 69 6c 6c 20 62 65 20 61 73 73 69 67 6e 65 64 20 49 50 20 61 64 64 72 65 | lients.will.be.assigned.IP.addre |
| 3e60 | 73 73 65 73 20 77 69 74 68 69 6e 20 74 68 65 20 72 61 6e 67 65 20 6f 66 20 60 60 31 39 32 2e 31 | sses.within.the.range.of.``192.1 |
| 3e80 | 36 38 2e 30 2e 39 20 2d 20 31 39 32 2e 31 36 38 2e 30 2e 32 35 34 60 60 20 61 6e 64 20 68 61 76 | 68.0.9.-.192.168.0.254``.and.hav |
| 3ea0 | 65 20 61 20 64 6f 6d 61 69 6e 20 6e 61 6d 65 20 6f 66 20 60 60 69 6e 74 65 72 6e 61 6c 2d 6e 65 | e.a.domain.name.of.``internal-ne |
| 3ec0 | 74 77 6f 72 6b 60 60 00 44 48 43 50 20 6c 65 61 73 65 73 20 77 69 6c 6c 20 68 6f 6c 64 20 66 6f | twork``.DHCP.leases.will.hold.fo |
| 3ee0 | 72 20 6f 6e 65 20 64 61 79 20 28 38 36 34 30 30 20 73 65 63 6f 6e 64 73 29 00 44 48 43 50 2f 44 | r.one.day.(86400.seconds).DHCP/D |
| 3f00 | 4e 53 20 71 75 69 63 6b 2d 73 74 61 72 74 00 44 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 | NS.quick-start.Documentation.for |
| 3f20 | 20 6d 6f 73 74 20 6f 66 20 74 68 65 20 6e 65 77 20 66 69 72 65 77 61 6c 6c 20 43 4c 49 20 63 61 | .most.of.the.new.firewall.CLI.ca |
| 3f40 | 6e 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 3a 72 65 66 3a 60 66 69 72 65 77 61 6c 6c | n.be.found.in.the.:ref:`firewall |
| 3f60 | 60 20 63 68 61 70 74 65 72 2e 54 68 65 20 6c 65 67 61 63 79 20 66 69 72 65 77 61 6c 6c 20 69 73 | `.chapter.The.legacy.firewall.is |
| 3f80 | 20 73 74 69 6c 6c 20 61 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 76 65 72 73 69 6f 6e 73 20 62 65 | .still.available.for.versions.be |
| 3fa0 | 66 6f 72 65 20 60 60 31 2e 34 2d 72 6f 6c 6c 69 6e 67 2d 32 30 32 33 30 38 30 34 30 35 35 37 60 | fore.``1.4-rolling-202308040557` |
| 3fc0 | 60 20 61 6e 64 20 63 61 6e 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 3a 72 65 66 3a 60 | `.and.can.be.found.in.the.:ref:` |
| 3fe0 | 66 69 72 65 77 61 6c 6c 2d 6c 65 67 61 63 79 60 20 63 68 61 70 74 65 72 2e 20 54 68 65 20 65 78 | firewall-legacy`.chapter..The.ex |
| 4000 | 61 6d 70 6c 65 73 20 69 6e 20 74 68 69 73 20 73 65 63 74 69 6f 6e 20 75 73 65 20 74 68 65 20 6e | amples.in.this.section.use.the.n |
| 4020 | 65 77 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 00 45 73 70 65 63 69 61 6c 6c 79 20 69 66 20 | ew.configuration..Especially.if. |
| 4040 | 79 6f 75 20 61 72 65 20 61 6c 6c 6f 77 69 6e 67 20 53 53 48 20 72 65 6d 6f 74 65 20 61 63 63 65 | you.are.allowing.SSH.remote.acce |
| 4060 | 73 73 20 66 72 6f 6d 20 74 68 65 20 6f 75 74 73 69 64 65 2f 57 41 4e 20 69 6e 74 65 72 66 61 63 | ss.from.the.outside/WAN.interfac |
| 4080 | 65 2c 20 74 68 65 72 65 20 61 72 65 20 61 20 66 65 77 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f | e,.there.are.a.few.additional.co |
| 40a0 | 6e 66 69 67 75 72 61 74 69 6f 6e 20 73 74 65 70 73 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 | nfiguration.steps.that.should.be |
| 40c0 | 20 74 61 6b 65 6e 2e 00 46 69 6e 61 6c 6c 79 2c 20 63 6f 6e 66 69 67 75 72 65 20 74 68 65 20 60 | .taken..Finally,.configure.the.` |
| 40e0 | 60 56 79 4f 53 5f 4d 41 4e 41 47 45 4d 45 4e 54 60 60 20 63 68 61 69 6e 20 74 6f 20 61 63 63 65 | `VyOS_MANAGEMENT``.chain.to.acce |
| 4100 | 70 74 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 60 60 4c 41 4e 60 60 20 69 | pt.connection.from.the.``LAN``.i |
| 4120 | 6e 74 65 72 66 61 63 65 20 67 72 6f 75 70 20 77 68 69 6c 65 20 6c 69 6d 69 74 69 6e 67 20 72 65 | nterface.group.while.limiting.re |
| 4140 | 71 75 65 73 74 73 20 63 6f 6d 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 60 60 57 41 4e 60 60 20 69 | quests.coming.from.the.``WAN``.i |
| 4160 | 6e 74 65 72 66 61 63 65 20 67 72 6f 75 70 20 74 6f 20 34 20 70 65 72 20 6d 69 6e 75 74 65 3a 00 | nterface.group.to.4.per.minute:. |
| 4180 | 46 69 6e 61 6c 6c 79 2c 20 74 72 79 20 61 6e 64 20 53 53 48 20 69 6e 74 6f 20 74 68 65 20 56 79 | Finally,.try.and.SSH.into.the.Vy |
| 41a0 | 4f 53 20 69 6e 73 74 61 6c 6c 20 61 73 20 79 6f 75 72 20 6e 65 77 20 75 73 65 72 2e 20 4f 6e 63 | OS.install.as.your.new.user..Onc |
| 41c0 | 65 20 79 6f 75 20 68 61 76 65 20 63 6f 6e 66 69 72 6d 65 64 20 74 68 61 74 20 79 6f 75 72 20 6e | e.you.have.confirmed.that.your.n |
| 41e0 | 65 77 20 75 73 65 72 20 63 61 6e 20 61 63 63 65 73 73 20 79 6f 75 72 20 72 6f 75 74 65 72 20 77 | ew.user.can.access.your.router.w |
| 4200 | 69 74 68 6f 75 74 20 61 20 70 61 73 73 77 6f 72 64 2c 20 64 65 6c 65 74 65 20 74 68 65 20 6f 72 | ithout.a.password,.delete.the.or |
| 4220 | 69 67 69 6e 61 6c 20 60 60 76 79 6f 73 60 60 20 75 73 65 72 20 61 6e 64 20 63 6f 6d 70 6c 65 74 | iginal.``vyos``.user.and.complet |
| 4240 | 65 6c 79 20 64 69 73 61 62 6c 65 20 70 61 73 73 77 6f 72 64 20 61 75 74 68 65 6e 74 69 63 61 74 | ely.disable.password.authenticat |
| 4260 | 69 6f 6e 20 66 6f 72 20 3a 72 65 66 3a 60 73 73 68 60 3a 00 46 69 6e 61 6c 6c 79 2c 20 77 65 20 | ion.for.:ref:`ssh`:.Finally,.we. |
| 4280 | 63 61 6e 20 6e 6f 77 20 63 6f 6e 66 69 67 75 72 65 20 61 63 63 65 73 73 20 74 6f 20 74 68 65 20 | can.now.configure.access.to.the. |
| 42a0 | 73 65 72 76 69 63 65 73 20 72 75 6e 6e 69 6e 67 20 6f 6e 20 74 68 69 73 20 72 6f 75 74 65 72 2c | services.running.on.this.router, |
| 42c0 | 20 61 6c 6c 6f 77 69 6e 67 20 61 6c 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 63 6f 6d 69 6e 67 | .allowing.all.connections.coming |
| 42e0 | 20 66 72 6f 6d 20 6c 6f 63 61 6c 68 6f 73 74 3a 00 46 69 72 65 77 61 6c 6c 00 46 69 72 73 74 2c | .from.localhost:.Firewall.First, |
| 4300 | 20 63 72 65 61 74 65 20 61 20 6e 65 77 20 64 65 64 69 63 61 74 65 64 20 63 68 61 69 6e 20 28 60 | .create.a.new.dedicated.chain.(` |
| 4320 | 60 56 79 4f 53 5f 4d 41 4e 41 47 45 4d 45 4e 54 60 60 29 20 66 6f 72 20 6d 61 6e 61 67 65 6d 65 | `VyOS_MANAGEMENT``).for.manageme |
| 4340 | 6e 74 20 61 63 63 65 73 73 2c 20 77 68 69 63 68 20 72 65 74 75 72 6e 73 20 74 6f 20 74 68 65 20 | nt.access,.which.returns.to.the. |
| 4360 | 70 61 72 65 6e 74 20 63 68 61 69 6e 20 69 66 20 6e 6f 20 61 63 74 69 6f 6e 20 69 73 20 74 61 6b | parent.chain.if.no.action.is.tak |
| 4380 | 65 6e 2e 20 41 64 64 20 61 20 72 75 6c 65 20 74 6f 20 61 63 63 65 70 74 20 74 72 61 66 66 69 63 | en..Add.a.rule.to.accept.traffic |
| 43a0 | 20 66 72 6f 6d 20 74 68 65 20 60 60 4c 41 4e 60 60 20 69 6e 74 65 72 66 61 63 65 20 67 72 6f 75 | .from.the.``LAN``.interface.grou |
| 43c0 | 70 3a 00 48 61 72 64 65 6e 69 6e 67 00 48 65 72 65 20 77 65 27 72 65 20 61 6c 6c 6f 77 69 6e 67 | p:.Hardening.Here.we're.allowing |
| 43e0 | 20 74 68 65 20 72 6f 75 74 65 72 20 74 6f 20 72 65 73 70 6f 6e 64 20 74 6f 20 70 69 6e 67 73 2e | .the.router.to.respond.to.pings. |
| 4400 | 20 54 68 65 6e 2c 20 77 65 20 63 61 6e 20 61 6c 6c 6f 77 20 61 63 63 65 73 73 20 74 6f 20 74 68 | .Then,.we.can.allow.access.to.th |
| 4420 | 65 20 44 4e 53 20 72 65 63 75 72 73 6f 72 20 77 65 20 63 6f 6e 66 69 67 75 72 65 64 20 65 61 72 | e.DNS.recursor.we.configured.ear |
| 4440 | 6c 69 65 72 2c 20 61 63 63 65 70 74 69 6e 67 20 74 72 61 66 66 69 63 20 62 6f 75 6e 64 20 66 6f | lier,.accepting.traffic.bound.fo |
| 4460 | 72 20 70 6f 72 74 20 35 33 20 66 72 6f 6d 20 61 6c 6c 20 68 6f 73 74 73 20 6f 6e 20 74 68 65 20 | r.port.53.from.all.hosts.on.the. |
| 4480 | 60 60 4e 45 54 2d 49 4e 53 49 44 45 2d 76 34 60 60 20 6e 65 74 77 6f 72 6b 3a 00 49 66 20 79 6f | ``NET-INSIDE-v4``.network:.If.yo |
| 44a0 | 75 20 77 61 6e 74 65 64 20 74 6f 20 65 6e 61 62 6c 65 20 53 53 48 20 61 63 63 65 73 73 20 74 6f | u.wanted.to.enable.SSH.access.to |
| 44c0 | 20 79 6f 75 72 20 66 69 72 65 77 61 6c 6c 20 66 72 6f 6d 20 74 68 65 20 6f 75 74 73 69 64 65 2f | .your.firewall.from.the.outside/ |
| 44e0 | 57 41 4e 20 69 6e 74 65 72 66 61 63 65 2c 20 79 6f 75 20 63 6f 75 6c 64 20 63 72 65 61 74 65 20 | WAN.interface,.you.could.create. |
| 4500 | 73 6f 6d 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 72 75 6c 65 73 20 74 6f 20 61 6c 6c 6f 77 20 74 | some.additional.rules.to.allow.t |
| 4520 | 68 61 74 20 6b 69 6e 64 20 6f 66 20 74 72 61 66 66 69 63 2e 00 49 6e 20 74 68 69 73 20 63 61 73 | hat.kind.of.traffic..In.this.cas |
| 4540 | 65 2c 20 77 65 20 77 69 6c 6c 20 63 72 65 61 74 65 20 74 77 6f 20 69 6e 74 65 72 66 61 63 65 20 | e,.we.will.create.two.interface. |
| 4560 | 67 72 6f 75 70 73 20 e2 80 94 20 61 20 60 60 57 41 4e 60 60 20 67 72 6f 75 70 20 66 6f 72 20 6f | groups.....a.``WAN``.group.for.o |
| 4580 | 75 72 20 69 6e 74 65 72 66 61 63 65 73 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 74 68 65 20 70 | ur.interfaces.connected.to.the.p |
| 45a0 | 75 62 6c 69 63 20 69 6e 74 65 72 6e 65 74 20 61 6e 64 20 61 20 60 60 4c 41 4e 60 60 20 67 72 6f | ublic.internet.and.a.``LAN``.gro |
| 45c0 | 75 70 20 66 6f 72 20 74 68 65 20 69 6e 74 65 72 66 61 63 65 73 20 63 6f 6e 6e 65 63 74 65 64 20 | up.for.the.interfaces.connected. |
| 45e0 | 74 6f 20 6f 75 72 20 69 6e 74 65 72 6e 61 6c 20 6e 65 74 77 6f 72 6b 2e 20 41 64 64 69 74 69 6f | to.our.internal.network..Additio |
| 4600 | 6e 61 6c 6c 79 2c 20 77 65 20 77 69 6c 6c 20 63 72 65 61 74 65 20 61 20 6e 65 74 77 6f 72 6b 20 | nally,.we.will.create.a.network. |
| 4620 | 67 72 6f 75 70 2c 20 60 60 4e 45 54 2d 49 4e 53 49 44 45 2d 76 34 60 60 2c 20 74 68 61 74 20 63 | group,.``NET-INSIDE-v4``,.that.c |
| 4640 | 6f 6e 74 61 69 6e 73 20 6f 75 72 20 69 6e 74 65 72 6e 61 6c 20 73 75 62 6e 65 74 2e 00 49 6e 20 | ontains.our.internal.subnet..In. |
| 4660 | 74 68 69 73 20 63 61 73 65 2c 20 77 65 20 77 69 6c 6c 20 63 72 65 61 74 65 20 74 77 6f 20 69 6e | this.case,.we.will.create.two.in |
| 4680 | 74 65 72 66 61 63 65 20 67 72 6f 75 70 73 e2 80 94 61 20 60 60 57 41 4e 60 60 20 67 72 6f 75 70 | terface.groups...a.``WAN``.group |
| 46a0 | 20 66 6f 72 20 6f 75 72 20 69 6e 74 65 72 66 61 63 65 73 20 63 6f 6e 6e 65 63 74 65 64 20 74 6f | .for.our.interfaces.connected.to |
| 46c0 | 20 74 68 65 20 70 75 62 6c 69 63 20 69 6e 74 65 72 6e 65 74 20 61 6e 64 20 61 20 60 60 4c 41 4e | .the.public.internet.and.a.``LAN |
| 46e0 | 60 60 20 67 72 6f 75 70 20 66 6f 72 20 74 68 65 20 69 6e 74 65 72 66 61 63 65 73 20 63 6f 6e 6e | ``.group.for.the.interfaces.conn |
| 4700 | 65 63 74 65 64 20 74 6f 20 6f 75 72 20 69 6e 74 65 72 6e 61 6c 20 6e 65 74 77 6f 72 6b 2e 20 41 | ected.to.our.internal.network..A |
| 4720 | 64 64 69 74 69 6f 6e 61 6c 6c 79 2c 20 77 65 20 77 69 6c 6c 20 63 72 65 61 74 65 20 61 20 6e 65 | dditionally,.we.will.create.a.ne |
| 4740 | 74 77 6f 72 6b 20 67 72 6f 75 70 2c 20 60 60 4e 45 54 2d 49 4e 53 49 44 45 2d 76 34 60 60 2c 20 | twork.group,.``NET-INSIDE-v4``,. |
| 4760 | 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 6f 75 72 20 69 6e 74 65 72 6e 61 6c 20 73 75 62 6e 65 | that.contains.our.internal.subne |
| 4780 | 74 2e 00 49 6e 74 65 72 66 61 63 65 20 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 00 4d 6f 73 74 20 | t..Interface.Configuration.Most. |
| 47a0 | 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 73 20 77 6f 75 6c 64 20 63 68 6f 6f 73 65 20 74 68 69 73 20 | installations.would.choose.this. |
| 47c0 | 6f 70 74 69 6f 6e 2c 20 61 6e 64 20 77 69 6c 6c 20 63 6f 6e 74 61 69 6e 3a 00 4e 41 54 00 4e 6f | option,.and.will.contain:.NAT.No |
| 47e0 | 77 20 74 68 61 74 20 77 65 20 68 61 76 65 20 63 6f 6e 66 69 67 75 72 65 64 20 73 74 61 74 65 66 | w.that.we.have.configured.statef |
| 4800 | 75 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 66 69 6c 74 65 72 69 6e 67 20 74 6f 20 61 6c 6c 6f 77 | ul.connection.filtering.to.allow |
| 4820 | 20 74 72 61 66 66 69 63 20 66 72 6f 6d 20 65 73 74 61 62 6c 69 73 68 65 64 20 61 6e 64 20 72 65 | .traffic.from.established.and.re |
| 4840 | 6c 61 74 65 64 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 2c 20 77 65 20 63 61 6e 20 62 6c 6f 63 6b 20 | lated.connections,.we.can.block. |
| 4860 | 61 6c 6c 20 6f 74 68 65 72 20 69 6e 63 6f 6d 69 6e 67 20 74 72 61 66 66 69 63 20 61 64 64 72 65 | all.other.incoming.traffic.addre |
| 4880 | 73 73 65 64 20 74 6f 20 6f 75 72 20 6c 6f 63 61 6c 20 6e 65 74 77 6f 72 6b 2e 00 4f 6e 63 65 20 | ssed.to.our.local.network..Once. |
| 48a0 | 79 6f 75 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 77 6f 72 6b 73 20 61 73 20 65 78 70 65 | your.configuration.works.as.expe |
| 48c0 | 63 74 65 64 2c 20 79 6f 75 20 63 61 6e 20 73 61 76 65 20 69 74 20 70 65 72 6d 61 6e 65 6e 74 6c | cted,.you.can.save.it.permanentl |
| 48e0 | 79 20 62 79 20 75 73 69 6e 67 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6d 6d 61 6e 64 | y.by.using.the.following.command |
| 4900 | 3a 00 4f 6e 6c 79 20 68 6f 73 74 73 20 66 72 6f 6d 20 79 6f 75 72 20 69 6e 74 65 72 6e 61 6c 2f | :.Only.hosts.from.your.internal/ |
| 4920 | 4c 41 4e 20 6e 65 74 77 6f 72 6b 20 63 61 6e 20 75 73 65 20 74 68 65 20 44 4e 53 20 72 65 63 75 | LAN.network.can.use.the.DNS.recu |
| 4940 | 72 73 6f 72 00 4f 70 74 69 6f 6e 20 31 3a 20 43 6f 6d 6d 6f 6e 20 43 68 61 69 6e 00 4f 70 74 69 | rsor.Option.1:.Common.Chain.Opti |
| 4960 | 6f 6e 20 31 3a 20 47 6c 6f 62 61 6c 20 53 74 61 74 65 20 50 6f 6c 69 63 69 65 73 00 4f 70 74 69 | on.1:.Global.State.Policies.Opti |
| 4980 | 6f 6e 20 32 3a 20 43 6f 6d 6d 6f 6e 2f 43 75 73 74 6f 6d 20 43 68 61 69 6e 00 4f 70 74 69 6f 6e | on.2:.Common/Custom.Chain.Option |
| 49a0 | 20 32 3a 20 50 65 72 2d 48 6f 6f 6b 20 43 68 61 69 6e 00 4f 70 74 69 6f 6e 20 33 3a 20 50 65 72 | .2:.Per-Hook.Chain.Option.3:.Per |
| 49c0 | 2d 48 6f 6f 6b 20 43 68 61 69 6e 00 51 75 69 63 6b 20 53 74 61 72 74 00 52 65 70 6c 61 63 65 20 | -Hook.Chain.Quick.Start.Replace. |
| 49e0 | 74 68 65 20 64 65 66 61 75 6c 74 20 60 60 76 79 6f 73 60 60 20 73 79 73 74 65 6d 20 75 73 65 72 | the.default.``vyos``.system.user |
| 4a00 | 3a 00 52 65 70 6c 61 63 65 20 74 68 65 20 64 65 66 61 75 6c 74 20 60 76 79 6f 73 60 20 73 79 73 | :.Replace.the.default.`vyos`.sys |
| 4a20 | 74 65 6d 20 75 73 65 72 3a 00 53 53 48 20 4d 61 6e 61 67 65 6d 65 6e 74 00 53 65 74 20 75 70 20 | tem.user:.SSH.Management.Set.up. |
| 4a40 | 3a 72 65 66 3a 60 73 73 68 5f 6b 65 79 5f 62 61 73 65 64 5f 61 75 74 68 65 6e 74 69 63 61 74 69 | :ref:`ssh_key_based_authenticati |
| 4a60 | 6f 6e 60 3a 00 54 68 65 20 61 64 64 72 65 73 73 20 72 61 6e 67 65 20 60 31 39 32 2e 31 36 38 2e | on`:.The.address.range.`192.168. |
| 4a80 | 30 2e 32 2f 32 34 20 2d 20 31 39 32 2e 31 36 38 2e 30 2e 38 2f 32 34 60 20 77 69 6c 6c 20 62 65 | 0.2/24.-.192.168.0.8/24`.will.be |
| 4aa0 | 20 72 65 73 65 72 76 65 64 20 66 6f 72 20 73 74 61 74 69 63 20 61 73 73 69 67 6e 6d 65 6e 74 73 | .reserved.for.static.assignments |
| 4ac0 | 00 54 68 65 20 61 64 64 72 65 73 73 20 72 61 6e 67 65 20 60 60 31 39 32 2e 31 36 38 2e 30 2e 32 | .The.address.range.``192.168.0.2 |
| 4ae0 | 2f 32 34 20 2d 20 31 39 32 2e 31 36 38 2e 30 2e 38 2f 32 34 60 60 20 77 69 6c 6c 20 62 65 20 72 | /24.-.192.168.0.8/24``.will.be.r |
| 4b00 | 65 73 65 72 76 65 64 20 66 6f 72 20 73 74 61 74 69 63 20 61 73 73 69 67 6e 6d 65 6e 74 73 00 54 | eserved.for.static.assignments.T |
| 4b20 | 68 65 20 63 68 61 69 6e 20 77 65 20 77 69 6c 6c 20 63 72 65 61 74 65 20 69 73 20 63 61 6c 6c 65 | he.chain.we.will.create.is.calle |
| 4b40 | 64 20 60 60 43 4f 4e 4e 5f 46 49 4c 54 45 52 60 60 20 61 6e 64 20 68 61 73 20 74 68 72 65 65 20 | d.``CONN_FILTER``.and.has.three. |
| 4b60 | 72 75 6c 65 73 3a 00 54 68 65 20 64 65 66 61 75 6c 74 20 67 61 74 65 77 61 79 20 61 6e 64 20 44 | rules:.The.default.gateway.and.D |
| 4b80 | 4e 53 20 72 65 63 75 72 73 6f 72 20 61 64 64 72 65 73 73 20 77 69 6c 6c 20 62 65 20 60 31 39 32 | NS.recursor.address.will.be.`192 |
| 4ba0 | 2e 31 36 38 2e 30 2e 31 2f 32 34 60 00 54 68 65 20 64 65 66 61 75 6c 74 20 67 61 74 65 77 61 79 | .168.0.1/24`.The.default.gateway |
| 4bc0 | 20 61 6e 64 20 44 4e 53 20 72 65 63 75 72 73 6f 72 20 61 64 64 72 65 73 73 20 77 69 6c 6c 20 62 | .and.DNS.recursor.address.will.b |
| 4be0 | 65 20 60 60 31 39 32 2e 31 36 38 2e 30 2e 31 2f 32 34 60 60 00 54 68 65 20 66 69 72 65 77 61 6c | e.``192.168.0.1/24``.The.firewal |
| 4c00 | 6c 20 62 65 67 69 6e 73 20 77 69 74 68 20 74 68 65 20 62 61 73 65 20 60 60 66 69 6c 74 65 72 60 | l.begins.with.the.base.``filter` |
| 4c20 | 60 20 74 61 62 6c 65 73 20 79 6f 75 20 64 65 66 69 6e 65 20 66 6f 72 20 65 61 63 68 20 6f 66 20 | `.tables.you.define.for.each.of. |
| 4c40 | 74 68 65 20 60 60 66 6f 72 77 61 72 64 60 60 2c 20 60 60 69 6e 70 75 74 60 60 2c 20 61 6e 64 20 | the.``forward``,.``input``,.and. |
| 4c60 | 60 60 6f 75 74 70 75 74 60 60 20 4e 65 74 66 69 74 65 72 20 68 6f 6f 6b 73 2e 20 45 61 63 68 20 | ``output``.Netfiter.hooks..Each. |
| 4c80 | 6f 66 20 74 68 65 73 65 20 74 61 62 6c 65 73 20 69 73 20 70 6f 70 75 6c 61 74 65 64 20 77 69 74 | of.these.tables.is.populated.wit |
| 4ca0 | 68 20 72 75 6c 65 73 20 74 68 61 74 20 61 72 65 20 70 72 6f 63 65 73 73 65 64 20 69 6e 20 6f 72 | h.rules.that.are.processed.in.or |
| 4cc0 | 64 65 72 20 61 6e 64 20 63 61 6e 20 6a 75 6d 70 20 74 6f 20 6f 74 68 65 72 20 63 68 61 69 6e 73 | der.and.can.jump.to.other.chains |
| 4ce0 | 20 66 6f 72 20 6d 6f 72 65 20 67 72 61 6e 75 6c 61 72 20 66 69 6c 74 65 72 69 6e 67 2e 00 54 68 | .for.more.granular.filtering..Th |
| 4d00 | 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 73 65 74 74 69 6e 67 73 20 77 69 6c 6c 20 63 6f 6e 66 69 67 | e.following.settings.will.config |
| 4d20 | 75 72 65 20 3a 72 65 66 3a 60 73 6f 75 72 63 65 2d 6e 61 74 60 20 72 75 6c 65 73 20 66 6f 72 20 | ure.:ref:`source-nat`.rules.for. |
| 4d40 | 6f 75 72 20 69 6e 74 65 72 6e 61 6c 2f 4c 41 4e 20 6e 65 74 77 6f 72 6b 2c 20 61 6c 6c 6f 77 69 | our.internal/LAN.network,.allowi |
| 4d60 | 6e 67 20 68 6f 73 74 73 20 74 6f 20 63 6f 6d 6d 75 6e 69 63 61 74 65 20 74 68 72 6f 75 67 68 20 | ng.hosts.to.communicate.through. |
| 4d80 | 74 68 65 20 6f 75 74 73 69 64 65 2f 57 41 4e 20 6e 65 74 77 6f 72 6b 20 76 69 61 20 49 50 20 6d | the.outside/WAN.network.via.IP.m |
| 4da0 | 61 73 71 75 65 72 61 64 65 2e 00 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 73 65 74 74 69 6e 67 | asquerade..The.following.setting |
| 4dc0 | 73 20 77 69 6c 6c 20 63 6f 6e 66 69 67 75 72 65 20 44 48 43 50 20 61 6e 64 20 44 4e 53 20 73 65 | s.will.configure.DHCP.and.DNS.se |
| 4de0 | 72 76 69 63 65 73 20 6f 6e 20 79 6f 75 72 20 69 6e 74 65 72 6e 61 6c 2f 4c 41 4e 20 6e 65 74 77 | rvices.on.your.internal/LAN.netw |
| 4e00 | 6f 72 6b 2c 20 77 68 65 72 65 20 56 79 4f 53 20 77 69 6c 6c 20 61 63 74 20 61 73 20 74 68 65 20 | ork,.where.VyOS.will.act.as.the. |
| 4e20 | 64 65 66 61 75 6c 74 20 67 61 74 65 77 61 79 20 61 6e 64 20 44 4e 53 20 73 65 72 76 65 72 2e 00 | default.gateway.and.DNS.server.. |
| 4e40 | 54 68 65 6e 2c 20 77 65 20 63 61 6e 20 6a 75 6d 70 20 74 6f 20 74 68 65 20 63 6f 6d 6d 6f 6e 20 | Then,.we.can.jump.to.the.common. |
| 4e60 | 63 68 61 69 6e 20 66 72 6f 6d 20 62 6f 74 68 20 74 68 65 20 60 60 66 6f 72 77 61 72 64 60 60 20 | chain.from.both.the.``forward``. |
| 4e80 | 61 6e 64 20 60 60 69 6e 70 75 74 60 60 20 68 6f 6f 6b 73 20 61 73 20 74 68 65 20 66 69 72 73 74 | and.``input``.hooks.as.the.first |
| 4ea0 | 20 66 69 6c 74 65 72 69 6e 67 20 72 75 6c 65 20 69 6e 20 74 68 65 20 72 65 73 70 65 63 74 69 76 | .filtering.rule.in.the.respectiv |
| 4ec0 | 65 20 63 68 61 69 6e 73 3a 00 54 68 65 73 65 20 72 75 6c 65 73 20 61 6c 6c 6f 77 20 53 53 48 20 | e.chains:.These.rules.allow.SSH. |
| 4ee0 | 74 72 61 66 66 69 63 20 61 6e 64 20 72 61 74 65 20 6c 69 6d 69 74 20 69 74 20 74 6f 20 34 20 72 | traffic.and.rate.limit.it.to.4.r |
| 4f00 | 65 71 75 65 73 74 73 20 70 65 72 20 6d 69 6e 75 74 65 2e 20 54 68 69 73 20 62 6c 6f 63 6b 73 20 | equests.per.minute..This.blocks. |
| 4f20 | 62 72 75 74 65 2d 66 6f 72 63 69 6e 67 20 61 74 74 65 6d 70 74 73 3a 00 54 68 69 73 20 63 68 61 | brute-forcing.attempts:.This.cha |
| 4f40 | 70 74 65 72 20 77 69 6c 6c 20 67 75 69 64 65 20 79 6f 75 20 6f 6e 20 68 6f 77 20 74 6f 20 67 65 | pter.will.guide.you.on.how.to.ge |
| 4f60 | 74 20 75 70 20 74 6f 20 73 70 65 65 64 20 71 75 69 63 6b 6c 79 20 75 73 69 6e 67 20 79 6f 75 72 | t.up.to.speed.quickly.using.your |
| 4f80 | 20 6e 65 77 20 56 79 4f 53 20 73 79 73 74 65 6d 2e 20 49 74 20 77 69 6c 6c 20 73 68 6f 77 20 79 | .new.VyOS.system..It.will.show.y |
| 4fa0 | 6f 75 20 61 20 76 65 72 79 20 62 61 73 69 63 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 65 78 | ou.a.very.basic.configuration.ex |
| 4fc0 | 61 6d 70 6c 65 20 74 68 61 74 20 77 69 6c 6c 20 70 72 6f 76 69 64 65 20 61 20 3a 72 65 66 3a 60 | ample.that.will.provide.a.:ref:` |
| 4fe0 | 6e 61 74 60 20 67 61 74 65 77 61 79 20 66 6f 72 20 61 20 64 65 76 69 63 65 20 77 69 74 68 20 74 | nat`.gateway.for.a.device.with.t |
| 5000 | 77 6f 20 6e 65 74 77 6f 72 6b 20 69 6e 74 65 72 66 61 63 65 73 20 28 60 60 65 74 68 30 60 60 20 | wo.network.interfaces.(``eth0``. |
| 5020 | 61 6e 64 20 60 60 65 74 68 31 60 60 29 2e 00 54 68 69 73 20 63 68 61 70 74 65 72 20 77 69 6c 6c | and.``eth1``)..This.chapter.will |
| 5040 | 20 67 75 69 64 65 20 79 6f 75 20 6f 6e 20 68 6f 77 20 74 6f 20 67 65 74 20 75 70 20 74 6f 20 73 | .guide.you.on.how.to.get.up.to.s |
| 5060 | 70 65 65 64 20 71 75 69 63 6b 6c 79 20 75 73 69 6e 67 20 79 6f 75 72 20 6e 65 77 20 56 79 4f 53 | peed.quickly.using.your.new.VyOS |
| 5080 | 20 73 79 73 74 65 6d 2e 20 49 74 20 77 69 6c 6c 20 73 68 6f 77 20 79 6f 75 20 61 20 76 65 72 79 | .system..It.will.show.you.a.very |
| 50a0 | 20 62 61 73 69 63 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 65 78 61 6d 70 6c 65 20 74 68 61 | .basic.configuration.example.tha |
| 50c0 | 74 20 77 69 6c 6c 20 70 72 6f 76 69 64 65 20 61 20 3a 72 65 66 3a 60 6e 61 74 60 20 67 61 74 65 | t.will.provide.a.:ref:`nat`.gate |
| 50e0 | 77 61 79 20 66 6f 72 20 61 20 64 65 76 69 63 65 20 77 69 74 68 20 74 77 6f 20 6e 65 74 77 6f 72 | way.for.a.device.with.two.networ |
| 5100 | 6b 20 69 6e 74 65 72 66 61 63 65 73 20 28 60 65 74 68 30 60 20 61 6e 64 20 60 65 74 68 31 60 29 | k.interfaces.(`eth0`.and.`eth1`) |
| 5120 | 2e 00 54 68 69 73 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 63 72 65 61 74 65 73 20 61 20 70 | ..This.configuration.creates.a.p |
| 5140 | 72 6f 70 65 72 20 73 74 61 74 65 66 75 6c 20 66 69 72 65 77 61 6c 6c 20 74 68 61 74 20 62 6c 6f | roper.stateful.firewall.that.blo |
| 5160 | 63 6b 73 20 61 6c 6c 20 74 72 61 66 66 69 63 20 77 68 69 63 68 20 77 61 73 20 6e 6f 74 20 69 6e | cks.all.traffic.which.was.not.in |
| 5180 | 69 74 69 61 74 65 64 20 66 72 6f 6d 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 2f 4c 41 4e 20 73 69 | itiated.from.the.internal/LAN.si |
| 51a0 | 64 65 20 66 69 72 73 74 2e 00 54 6f 20 6d 61 6b 65 20 66 69 72 65 77 61 6c 6c 20 63 6f 6e 66 69 | de.first..To.make.firewall.confi |
| 51c0 | 67 75 72 61 74 69 6f 6e 20 65 61 73 69 65 72 2c 20 77 65 20 63 61 6e 20 63 72 65 61 74 65 20 67 | guration.easier,.we.can.create.g |
| 51e0 | 72 6f 75 70 73 20 6f 66 20 69 6e 74 65 72 66 61 63 65 73 2c 20 6e 65 74 77 6f 72 6b 73 2c 20 61 | roups.of.interfaces,.networks,.a |
| 5200 | 64 64 72 65 73 73 65 73 2c 20 70 6f 72 74 73 2c 20 61 6e 64 20 64 6f 6d 61 69 6e 73 20 74 68 61 | ddresses,.ports,.and.domains.tha |
| 5220 | 74 20 64 65 73 63 72 69 62 65 20 64 69 66 66 65 72 65 6e 74 20 70 61 72 74 73 20 6f 66 20 6f 75 | t.describe.different.parts.of.ou |
| 5240 | 72 20 6e 65 74 77 6f 72 6b 2e 20 57 65 20 63 61 6e 20 74 68 65 6e 20 75 73 65 20 74 68 65 6d 20 | r.network..We.can.then.use.them. |
| 5260 | 66 6f 72 20 66 69 6c 74 65 72 69 6e 67 20 77 69 74 68 69 6e 20 6f 75 72 20 66 69 72 65 77 61 6c | for.filtering.within.our.firewal |
| 5280 | 6c 20 72 75 6c 65 73 65 74 73 2c 20 61 6c 6c 6f 77 69 6e 67 20 66 6f 72 20 6d 6f 72 65 20 63 6f | l.rulesets,.allowing.for.more.co |
| 52a0 | 6e 63 69 73 65 20 61 6e 64 20 72 65 61 64 61 62 6c 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e | ncise.and.readable.configuration |
| 52c0 | 2e 00 55 73 69 6e 67 20 6f 70 74 69 6f 6e 73 20 64 65 66 69 6e 65 64 20 69 6e 20 60 60 73 65 74 | ..Using.options.defined.in.``set |
| 52e0 | 20 66 69 72 65 77 61 6c 6c 20 67 6c 6f 62 61 6c 2d 6f 70 74 69 6f 6e 73 20 73 74 61 74 65 2d 70 | .firewall.global-options.state-p |
| 5300 | 6f 6c 69 63 79 60 60 2c 20 73 74 61 74 65 20 70 6f 6c 69 63 79 20 72 75 6c 65 73 20 74 68 61 74 | olicy``,.state.policy.rules.that |
| 5320 | 20 61 70 70 6c 69 65 73 20 66 6f 72 20 62 6f 74 68 20 49 50 76 34 20 61 6e 64 20 49 50 76 36 20 | .applies.for.both.IPv4.and.IPv6. |
| 5340 | 61 72 65 20 63 72 65 61 74 65 64 2e 20 54 68 65 73 65 20 67 6c 6f 62 61 6c 20 73 74 61 74 65 20 | are.created..These.global.state. |
| 5360 | 70 6f 6c 69 63 69 65 73 20 61 6c 73 6f 20 61 70 70 6c 69 65 73 20 66 6f 72 20 61 6c 6c 20 74 72 | policies.also.applies.for.all.tr |
| 5380 | 61 66 66 69 63 20 74 68 61 74 20 70 61 73 73 65 73 20 74 68 72 6f 75 67 68 20 74 68 65 20 72 6f | affic.that.passes.through.the.ro |
| 53a0 | 75 74 65 72 20 28 74 72 61 6e 73 69 74 29 20 61 6e 64 20 66 6f 72 20 74 72 61 66 66 69 63 20 6f | uter.(transit).and.for.traffic.o |
| 53c0 | 72 69 67 69 6e 61 74 65 64 2f 64 65 73 74 69 6e 61 74 65 64 20 74 6f 2f 66 72 6f 6d 20 74 68 65 | riginated/destinated.to/from.the |
| 53e0 | 20 72 6f 75 74 65 72 20 69 74 73 65 6c 66 2c 20 61 6e 64 20 77 69 6c 6c 20 62 65 20 61 76 61 6c | .router.itself,.and.will.be.aval |
| 5400 | 75 61 74 65 64 20 62 65 66 6f 72 65 20 61 6e 79 20 6f 74 68 65 72 20 72 75 6c 65 20 64 65 66 69 | uated.before.any.other.rule.defi |
| 5420 | 6e 65 64 20 69 6e 20 74 68 65 20 66 69 72 65 77 61 6c 6c 2e 00 55 73 69 6e 67 20 6f 70 74 69 6f | ned.in.the.firewall..Using.optio |
| 5440 | 6e 73 20 64 65 66 69 6e 65 64 20 69 6e 20 60 60 73 65 74 20 66 69 72 65 77 61 6c 6c 20 67 6c 6f | ns.defined.in.``set.firewall.glo |
| 5460 | 62 61 6c 2d 6f 70 74 69 6f 6e 73 20 73 74 61 74 65 2d 70 6f 6c 69 63 79 60 60 2c 20 73 74 61 74 | bal-options.state-policy``,.stat |
| 5480 | 65 20 70 6f 6c 69 63 79 20 72 75 6c 65 73 20 74 68 61 74 20 61 70 70 6c 69 65 73 20 66 6f 72 20 | e.policy.rules.that.applies.for. |
| 54a0 | 62 6f 74 68 20 49 50 76 34 20 61 6e 64 20 49 50 76 36 20 61 72 65 20 63 72 65 61 74 65 64 2e 20 | both.IPv4.and.IPv6.are.created.. |
| 54c0 | 54 68 65 73 65 20 67 6c 6f 62 61 6c 20 73 74 61 74 65 20 70 6f 6c 69 63 69 65 73 20 61 6c 73 6f | These.global.state.policies.also |
| 54e0 | 20 61 70 70 6c 69 65 73 20 66 6f 72 20 61 6c 6c 20 74 72 61 66 66 69 63 20 74 68 61 74 20 70 61 | .applies.for.all.traffic.that.pa |
| 5500 | 73 73 65 73 20 74 68 72 6f 75 67 68 20 74 68 65 20 72 6f 75 74 65 72 20 28 74 72 61 6e 73 69 74 | sses.through.the.router.(transit |
| 5520 | 29 20 61 6e 64 20 66 6f 72 20 74 72 61 66 66 69 63 20 6f 72 69 67 69 6e 61 74 65 64 2f 64 65 73 | ).and.for.traffic.originated/des |
| 5540 | 74 69 6e 61 74 65 64 20 74 6f 2f 66 72 6f 6d 20 74 68 65 20 72 6f 75 74 65 72 20 69 74 73 65 6c | tinated.to/from.the.router.itsel |
| 5560 | 66 2c 20 61 6e 64 20 77 69 6c 6c 20 62 65 20 65 76 61 6c 75 61 74 65 64 20 62 65 66 6f 72 65 20 | f,.and.will.be.evaluated.before. |
| 5580 | 61 6e 79 20 6f 74 68 65 72 20 72 75 6c 65 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 66 69 | any.other.rule.defined.in.the.fi |
| 55a0 | 72 65 77 61 6c 6c 2e 00 56 79 4f 53 20 77 69 6c 6c 20 73 65 72 76 65 20 61 73 20 61 20 66 75 6c | rewall..VyOS.will.serve.as.a.ful |
| 55c0 | 6c 20 44 4e 53 20 72 65 63 75 72 73 6f 72 2c 20 72 65 70 6c 61 63 69 6e 67 20 74 68 65 20 6e 65 | l.DNS.recursor,.replacing.the.ne |
| 55e0 | 65 64 20 74 6f 20 75 74 69 6c 69 7a 65 20 47 6f 6f 67 6c 65 2c 20 43 6c 6f 75 64 66 6c 61 72 65 | ed.to.utilize.Google,.Cloudflare |
| 5600 | 2c 20 6f 72 20 6f 74 68 65 72 20 70 75 62 6c 69 63 20 44 4e 53 20 73 65 72 76 65 72 73 20 28 77 | ,.or.other.public.DNS.servers.(w |
| 5620 | 68 69 63 68 20 69 73 20 67 6f 6f 64 20 66 6f 72 20 70 72 69 76 61 63 79 29 00 57 65 20 63 61 6e | hich.is.good.for.privacy).We.can |
| 5640 | 20 63 72 65 61 74 65 20 61 20 63 6f 6d 6d 6f 6e 20 63 68 61 69 6e 20 66 6f 72 20 73 74 61 74 65 | .create.a.common.chain.for.state |
| 5660 | 66 75 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 66 69 6c 74 65 72 69 6e 67 20 6f 66 20 6d 75 6c 74 | ful.connection.filtering.of.mult |
| 5680 | 69 70 6c 65 20 69 6e 74 65 72 66 61 63 65 73 20 28 6f 72 20 6d 75 6c 74 69 70 6c 65 20 6e 65 74 | iple.interfaces.(or.multiple.net |
| 56a0 | 66 69 6c 74 65 72 20 68 6f 6f 6b 73 20 6f 6e 20 6f 6e 65 20 69 6e 74 65 72 66 61 63 65 29 2e 20 | filter.hooks.on.one.interface).. |
| 56c0 | 54 68 6f 73 65 20 69 6e 64 69 76 69 64 75 61 6c 20 63 68 61 69 6e 73 20 63 61 6e 20 74 68 65 6e | Those.individual.chains.can.then |
| 56e0 | 20 6a 75 6d 70 20 74 6f 20 74 68 65 20 63 6f 6d 6d 6f 6e 20 63 68 61 69 6e 20 66 6f 72 20 73 74 | .jump.to.the.common.chain.for.st |
| 5700 | 61 74 65 66 75 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 66 69 6c 74 65 72 69 6e 67 2c 20 72 65 74 | ateful.connection.filtering,.ret |
| 5720 | 75 72 6e 69 6e 67 20 74 6f 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 63 68 61 69 6e 20 66 6f 72 | urning.to.the.original.chain.for |
| 5740 | 20 66 75 72 74 68 65 72 20 72 75 6c 65 20 70 72 6f 63 65 73 73 69 6e 67 20 69 66 20 6e 6f 20 61 | .further.rule.processing.if.no.a |
| 5760 | 63 74 69 6f 6e 20 69 73 20 74 61 6b 65 6e 20 6f 6e 20 74 68 65 20 70 61 63 6b 65 74 2e 00 57 65 | ction.is.taken.on.the.packet..We |
| 5780 | 20 63 61 6e 20 6e 6f 77 20 63 6f 6e 66 69 67 75 72 65 20 61 63 63 65 73 73 20 74 6f 20 74 68 65 | .can.now.configure.access.to.the |
| 57a0 | 20 72 6f 75 74 65 72 20 69 74 73 65 6c 66 2c 20 61 6c 6c 6f 77 69 6e 67 20 53 53 48 20 61 63 63 | .router.itself,.allowing.SSH.acc |
| 57c0 | 65 73 73 20 66 72 6f 6d 20 74 68 65 20 69 6e 73 69 64 65 2f 4c 41 4e 20 6e 65 74 77 6f 72 6b 20 | ess.from.the.inside/LAN.network. |
| 57e0 | 61 6e 64 20 72 61 74 65 20 6c 69 6d 69 74 69 6e 67 20 53 53 48 20 61 63 63 65 73 73 20 66 72 6f | and.rate.limiting.SSH.access.fro |
| 5800 | 6d 20 74 68 65 20 6f 75 74 73 69 64 65 2f 57 41 4e 20 6e 65 74 77 6f 72 6b 2e 00 57 65 20 73 68 | m.the.outside/WAN.network..We.sh |
| 5820 | 6f 75 6c 64 20 61 6c 73 6f 20 62 6c 6f 63 6b 20 61 6c 6c 20 74 72 61 66 66 69 63 20 64 65 73 74 | ould.also.block.all.traffic.dest |
| 5840 | 69 6e 61 74 65 64 20 74 6f 20 74 68 65 20 72 6f 75 74 65 72 20 69 74 73 65 6c 66 20 74 68 61 74 | inated.to.the.router.itself.that |
| 5860 | 20 69 73 6e 27 74 20 65 78 70 6c 69 63 69 74 6c 79 20 61 6c 6c 6f 77 65 64 20 61 74 20 73 6f 6d | .isn't.explicitly.allowed.at.som |
| 5880 | 65 20 70 6f 69 6e 74 20 69 6e 20 74 68 65 20 63 68 61 69 6e 20 66 6f 72 20 74 68 65 20 60 60 69 | e.point.in.the.chain.for.the.``i |
| 58a0 | 6e 70 75 74 60 60 20 68 6f 6f 6b 2e 20 41 73 20 77 65 27 76 65 20 61 6c 72 65 61 64 79 20 63 6f | nput``.hook..As.we've.already.co |
| 58c0 | 6e 66 69 67 75 72 65 64 20 73 74 61 74 65 66 75 6c 20 70 61 63 6b 65 74 20 66 69 6c 74 65 72 69 | nfigured.stateful.packet.filteri |
| 58e0 | 6e 67 20 61 62 6f 76 65 2c 20 77 65 20 6f 6e 6c 79 20 6e 65 65 64 20 74 6f 20 73 65 74 20 74 68 | ng.above,.we.only.need.to.set.th |
| 5900 | 65 20 64 65 66 61 75 6c 74 20 61 63 74 69 6f 6e 20 74 6f 20 60 60 64 72 6f 70 60 60 3a 00 57 69 | e.default.action.to.``drop``:.Wi |
| 5920 | 74 68 20 74 68 65 20 6e 65 77 20 66 69 72 65 77 61 6c 6c 20 73 74 72 75 63 74 75 72 65 2c 20 77 | th.the.new.firewall.structure,.w |
| 5940 | 65 20 68 61 76 65 20 68 61 76 65 20 61 20 6c 6f 74 20 6f 66 20 66 6c 65 78 69 62 69 6c 69 74 79 | e.have.have.a.lot.of.flexibility |
| 5960 | 20 69 6e 20 68 6f 77 20 77 65 20 67 72 6f 75 70 20 61 6e 64 20 6f 72 64 65 72 20 6f 75 72 20 72 | .in.how.we.group.and.order.our.r |
| 5980 | 75 6c 65 73 2c 20 61 73 20 73 68 6f 77 6e 20 62 79 20 74 68 65 20 74 68 72 65 65 20 61 6c 74 65 | ules,.as.shown.by.the.three.alte |
| 59a0 | 72 6e 61 74 69 76 65 20 61 70 70 72 6f 61 63 68 65 73 20 62 65 6c 6f 77 2e 00 57 69 74 68 20 74 | rnative.approaches.below..With.t |
| 59c0 | 68 65 20 6e 65 77 20 66 69 72 65 77 61 6c 6c 20 73 74 72 75 63 74 75 72 65 2c 20 77 65 20 68 61 | he.new.firewall.structure,.we.ha |
| 59e0 | 76 65 20 68 61 76 65 20 61 20 6c 6f 74 20 6f 66 20 66 6c 65 78 69 62 69 6c 69 74 79 20 69 6e 20 | ve.have.a.lot.of.flexibility.in. |
| 5a00 | 68 6f 77 20 77 65 20 67 72 6f 75 70 20 61 6e 64 20 6f 72 64 65 72 20 6f 75 72 20 72 75 6c 65 73 | how.we.group.and.order.our.rules |
| 5a20 | 2c 20 61 73 20 73 68 6f 77 6e 20 62 79 20 74 68 65 20 74 77 6f 20 61 6c 74 65 72 6e 61 74 69 76 | ,.as.shown.by.the.two.alternativ |
| 5a40 | 65 20 61 70 70 72 6f 61 63 68 65 73 20 62 65 6c 6f 77 2e 00 59 6f 75 20 6e 6f 77 20 73 68 6f 75 | e.approaches.below..You.now.shou |
| 5a60 | 6c 64 20 68 61 76 65 20 61 20 73 69 6d 70 6c 65 20 79 65 74 20 73 65 63 75 72 65 20 61 6e 64 20 | ld.have.a.simple.yet.secure.and. |
| 5a80 | 66 75 6e 63 74 69 6f 6e 69 6e 67 20 72 6f 75 74 65 72 20 74 6f 20 65 78 70 65 72 69 6d 65 6e 74 | functioning.router.to.experiment |
| 5aa0 | 20 77 69 74 68 20 66 75 72 74 68 65 72 2e 20 45 6e 6a 6f 79 21 00 59 6f 75 72 20 69 6e 74 65 72 | .with.further..Enjoy!.Your.inter |
| 5ac0 | 6e 61 6c 2f 4c 41 4e 20 69 6e 74 65 72 66 61 63 65 20 77 69 6c 6c 20 62 65 20 60 60 65 74 68 31 | nal/LAN.interface.will.be.``eth1 |
| 5ae0 | 60 60 2e 20 49 74 20 77 69 6c 6c 20 75 73 65 20 61 20 73 74 61 74 69 63 20 49 50 20 61 64 64 72 | ``..It.will.use.a.static.IP.addr |
| 5b00 | 65 73 73 20 6f 66 20 60 60 31 39 32 2e 31 36 38 2e 30 2e 31 2f 32 34 60 60 2e 00 59 6f 75 72 20 | ess.of.``192.168.0.1/24``..Your. |
| 5b20 | 69 6e 74 65 72 6e 61 6c 2f 4c 41 4e 20 69 6e 74 65 72 66 61 63 65 20 77 69 6c 6c 20 62 65 20 60 | internal/LAN.interface.will.be.` |
| 5b40 | 65 74 68 31 60 2e 20 49 74 20 77 69 6c 6c 20 75 73 65 20 61 20 73 74 61 74 69 63 20 49 50 20 61 | eth1`..It.will.use.a.static.IP.a |
| 5b60 | 64 64 72 65 73 73 20 6f 66 20 60 31 39 32 2e 31 36 38 2e 30 2e 31 2f 32 34 60 2e 00 59 6f 75 72 | ddress.of.`192.168.0.1/24`..Your |
| 5b80 | 20 6f 75 74 73 69 64 65 2f 57 41 4e 20 69 6e 74 65 72 66 61 63 65 20 77 69 6c 6c 20 62 65 20 60 | .outside/WAN.interface.will.be.` |
| 5ba0 | 60 65 74 68 30 60 60 2e 20 49 74 20 77 69 6c 6c 20 72 65 63 65 69 76 65 20 69 74 73 20 69 6e 74 | `eth0``..It.will.receive.its.int |
| 5bc0 | 65 72 66 61 63 65 20 61 64 64 72 65 73 73 20 76 69 61 20 44 48 43 50 2e 00 59 6f 75 72 20 6f 75 | erface.address.via.DHCP..Your.ou |
| 5be0 | 74 73 69 64 65 2f 57 41 4e 20 69 6e 74 65 72 66 61 63 65 20 77 69 6c 6c 20 62 65 20 60 65 74 68 | tside/WAN.interface.will.be.`eth |
| 5c00 | 30 60 2e 20 49 74 20 77 69 6c 6c 20 72 65 63 65 69 76 65 20 69 74 73 20 69 6e 74 65 72 66 61 63 | 0`..It.will.receive.its.interfac |
| 5c20 | 65 20 61 64 64 72 65 73 73 20 76 69 61 20 44 48 43 50 2e 00 | e.address.via.DHCP.. |