[{"data":1,"prerenderedAt":434},["ShallowReactive",2],{"docs-\u002Fdocs\u002Ffirewalls":3,"docs-nav":391},{"id":4,"title":5,"body":6,"description":382,"extension":383,"group":384,"meta":385,"navigation":386,"path":387,"seo":388,"stem":389,"__hash__":390},"docs\u002Fdocs\u002F07.firewalls.md","Firewalls",{"type":7,"value":8,"toc":376},"minimark",[9,13,17,26,31,34,47,50,54,73,162,259,263,280,288,337,354,358,369,372],[10,11,5],"h1",{"id":12},"firewalls",[14,15,16],"p",{},"A firewall is a named set of allow rules for a server's public network. You apply it to servers directly or through a label selector, so new servers with a matching label are covered from their first boot.",[14,18,19,20,25],{},"Nebla writes the rules into each server's own Proxmox VM firewall. The datacenter firewall must be on for them to apply. See ",[21,22,24],"a",{"href":23},"\u002Fdocs\u002Fproxmox#turn-on-the-datacenter-firewall","Connect Proxmox",".",[27,28,30],"h2",{"id":29},"how-rules-work","How rules work",[14,32,33],{},"Rules only allow traffic. What isn't allowed is dropped:",[35,36,37,41,44],"ul",{},[38,39,40],"li",{},"A server with no firewall allows all traffic.",[38,42,43],{},"A server with any firewall drops inbound traffic that no rule allows.",[38,45,46],{},"Outbound traffic is dropped only when one of the server's firewalls has an outbound rule. Then only what the outbound rules allow gets out.",[14,48,49],{},"When several firewalls apply to one server, their rules add up.",[27,51,53],{"id":52},"create-a-firewall","Create a firewall",[14,55,56,57,60,61,64,65,68,69,72],{},"Open ",[58,59,5],"strong",{},", choose ",[58,62,63],{},"Create firewall"," and add rules under ",[58,66,67],{},"Inbound"," and ",[58,70,71],{},"Outbound",". Each rule has:",[74,75,76,89],"table",{},[77,78,79],"thead",{},[80,81,82,86],"tr",{},[83,84,85],"th",{},"Field",[83,87,88],{},"Values",[90,91,92,118,134,146,154],"tbody",{},[80,93,94,98],{},[95,96,97],"td",{},"Protocol",[95,99,100,104,105,104,108,104,111,114,115],{},[101,102,103],"code",{},"tcp",", ",[101,106,107],{},"udp",[101,109,110],{},"icmp",[101,112,113],{},"esp"," or ",[101,116,117],{},"gre",[80,119,120,123],{},[95,121,122],{},"Port",[95,124,125,126,129,130,133],{},"A port such as ",[101,127,128],{},"22"," or a range such as ",[101,131,132],{},"8000-8100",", for TCP and UDP only",[80,135,136,139],{},[95,137,138],{},"Source IPs",[95,140,141,142,145],{},"For inbound rules: up to 50 CIDRs. ",[101,143,144],{},"0.0.0.0\u002F0, ::\u002F0"," means anywhere.",[80,147,148,151],{},[95,149,150],{},"Destination IPs",[95,152,153],{},"For outbound rules: up to 50 CIDRs.",[80,155,156,159],{},[95,157,158],{},"Description",[95,160,161],{},"Optional, up to 255 characters",[163,164,169],"pre",{"className":165,"code":166,"language":167,"meta":168,"style":168},"language-sh shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","nebla firewall create --name web\nnebla firewall add-rule web --direction in --protocol tcp --port 22 --source-ips 0.0.0.0\u002F0,::\u002F0\nnebla firewall add-rule web --direction in --protocol tcp --port 443 --source-ips 0.0.0.0\u002F0,::\u002F0\n","sh","",[101,170,171,194,231],{"__ignoreMap":168},[172,173,176,180,184,187,191],"span",{"class":174,"line":175},"line",1,[172,177,179],{"class":178},"szw1H","nebla",[172,181,183],{"class":182},"semJd"," firewall",[172,185,186],{"class":182}," create",[172,188,190],{"class":189},"ssYy9"," --name",[172,192,193],{"class":182}," web\n",[172,195,197,199,201,204,207,210,213,216,219,222,225,228],{"class":174,"line":196},2,[172,198,179],{"class":178},[172,200,183],{"class":182},[172,202,203],{"class":182}," add-rule",[172,205,206],{"class":182}," web",[172,208,209],{"class":189}," --direction",[172,211,212],{"class":182}," in",[172,214,215],{"class":189}," --protocol",[172,217,218],{"class":182}," tcp",[172,220,221],{"class":189}," --port",[172,223,224],{"class":189}," 22",[172,226,227],{"class":189}," --source-ips",[172,229,230],{"class":182}," 0.0.0.0\u002F0,::\u002F0\n",[172,232,234,236,238,240,242,244,246,248,250,252,255,257],{"class":174,"line":233},3,[172,235,179],{"class":178},[172,237,183],{"class":182},[172,239,203],{"class":182},[172,241,206],{"class":182},[172,243,209],{"class":189},[172,245,212],{"class":182},[172,247,215],{"class":189},[172,249,218],{"class":182},[172,251,221],{"class":189},[172,253,254],{"class":189}," 443",[172,256,227],{"class":189},[172,258,230],{"class":182},[27,260,262],{"id":261},"apply-it","Apply it",[14,264,265,266,269,270,114,273,276,277,279],{},"Under ",[58,267,268],{},"Applied to",", pick a server, or a label selector such as ",[101,271,272],{},"role=web",[101,274,275],{},"env!=prod",". The panel previews which servers match. A server's ",[58,278,5],{}," tab shows each firewall that covers it, and whether it applies directly or through a selector.",[14,281,282,283,287],{},"You can also pick firewalls when you ",[21,284,286],{"href":285},"\u002Fdocs\u002Fservers#create-a-server","create a server",". Nebla puts the rules in place before the server first boots.",[163,289,291],{"className":165,"code":290,"language":167,"meta":168,"style":168},"nebla firewall apply-to-resource web --type server --server web1\nnebla firewall apply-to-resource web --type label_selector --label-selector role=web\n",[101,292,293,316],{"__ignoreMap":168},[172,294,295,297,299,302,304,307,310,313],{"class":174,"line":175},[172,296,179],{"class":178},[172,298,183],{"class":182},[172,300,301],{"class":182}," apply-to-resource",[172,303,206],{"class":182},[172,305,306],{"class":189}," --type",[172,308,309],{"class":182}," server",[172,311,312],{"class":189}," --server",[172,314,315],{"class":182}," web1\n",[172,317,318,320,322,324,326,328,331,334],{"class":174,"line":196},[172,319,179],{"class":178},[172,321,183],{"class":182},[172,323,301],{"class":182},[172,325,206],{"class":182},[172,327,306],{"class":189},[172,329,330],{"class":182}," label_selector",[172,332,333],{"class":189}," --label-selector",[172,335,336],{"class":182}," role=web\n",[14,338,339,340,104,343,104,346,349,350,353],{},"Selectors are comma-separated terms that all must match: ",[101,341,342],{},"key=value",[101,344,345],{},"key!=value",[101,347,348],{},"key"," (the label exists) and ",[101,351,352],{},"!key"," (it doesn't).",[27,355,357],{"id":356},"limits","Limits",[35,359,360,363,366],{},[38,361,362],{},"A firewall holds up to 100 rules, and a project up to 50 firewalls.",[38,364,365],{},"A server can have up to 5 firewalls.",[38,367,368],{},"The rules covering one server can expand to at most 250 Proxmox rules. IPv4 and IPv6 parts of a rule count separately, and long address lists may split into several rules.",[14,370,371],{},"Proxmox loads rule changes on a cycle of about 10 seconds, so a change takes a few seconds to apply. Nebla checks the rules on every server and repairs any that were changed in Proxmox by hand.",[373,374,375],"style",{},"html pre.shiki code .szw1H, html code.shiki .szw1H{--shiki-light:#702C00;--shiki-default:#702C00;--shiki-dark:#FFB757}html pre.shiki code .semJd, html code.shiki .semJd{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":168,"searchDepth":196,"depth":196,"links":377},[378,379,380,381],{"id":29,"depth":196,"text":30},{"id":52,"depth":196,"text":53},{"id":261,"depth":196,"text":262},{"id":356,"depth":196,"text":357},"Allow-list firewall rules for inbound and outbound traffic, applied to servers directly or by label.","md","Use Nebla",{},true,"\u002Fdocs\u002Ffirewalls",{"title":5,"description":382},"docs\u002F07.firewalls","v6SoicnlNdBjPAf8W4UyX8Y41GPErww1Yy7WoQto2I0",[392,397,401,404,408,412,416,420,421,426,430],{"path":393,"title":394,"group":395,"stem":396},"\u002Fdocs","Overview","Get started","docs\u002F00.index",{"path":398,"title":399,"group":395,"stem":400},"\u002Fdocs\u002Finstall","Install","docs\u002F01.install",{"path":402,"title":24,"group":395,"stem":403},"\u002Fdocs\u002Fproxmox","docs\u002F02.proxmox",{"path":405,"title":406,"group":395,"stem":407},"\u002Fdocs\u002Fadmin","Set up the panel","docs\u002F03.admin",{"path":409,"title":410,"group":384,"stem":411},"\u002Fdocs\u002Fprojects","Projects and access","docs\u002F04.projects",{"path":413,"title":414,"group":384,"stem":415},"\u002Fdocs\u002Fservers","Servers","docs\u002F05.servers",{"path":417,"title":418,"group":384,"stem":419},"\u002Fdocs\u002Fvolumes","Volumes","docs\u002F06.volumes",{"path":387,"title":5,"group":384,"stem":389},{"path":422,"title":423,"group":424,"stem":425},"\u002Fdocs\u002Fcli","CLI","Reference","docs\u002F08.cli",{"path":427,"title":428,"group":424,"stem":429},"\u002Fdocs\u002Fapi","API","docs\u002F09.api",{"path":431,"title":432,"group":424,"stem":433},"\u002Fdocs\u002Ftroubleshooting","Troubleshooting","docs\u002F10.troubleshooting",1795243967232]