<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.E-MailFormatvorlage19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE-AT link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>The config.yml settings:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>security:<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> firewall:<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> enable: yes<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> logging:<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> days_kept: '7'<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> enable: yes<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> file: /var/log/firewall.log<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> tag: NGCPFW<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> nat_rules4: ~<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> nat_rules6: ~<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> policies:<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> forward: DROP<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> input: DROP<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> output: ACCEPT<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> rules4: ~<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> </span></i><i><span style='font-size:9.0pt'>rules6: ~<o:p></o:p></span></i></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>BTW: also no /var/log/firewall.log file will be created…<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE style='mso-fareast-language:DE-AT'>Von:</span></b><span lang=DE style='mso-fareast-language:DE-AT'> Spce-user <spce-user-bounces@lists.sipwise.com> <b>Im Auftrag von </b>Hohl Matthias<br><b>Gesendet:</b> Dienstag, 2. April 2019 15:18<br><b>An:</b> 'spce-user' <spce-user@lists.sipwise.com><br><b>Betreff:</b> [Spce-user] Possible Bug? - NGCP Firewall in mr6.5.3<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal><span style='mso-fareast-language:DE-AT'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>i configured the new NGCP Firewall in my config.yml file and apply it with ngcpcfg apply and my iptables looks like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>root@spce:~# iptables -L -n -v<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>Chain INPUT (policy ACCEPT 3139 packets, 517K bytes)<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>pkts bytes target prot opt in out source destination<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>3139 517K f2b-KAMAILIO all -- * * 0.0.0.0/0 0.0.0.0/0<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>3142 518K f2b-KAMAILIO all -- * * 0.0.0.0/0 0.0.0.0/0<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>3174 522K rtpengine all -- * * 0.0.0.0/0 0.0.0.0/0<o:p></o:p></span></i></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Now I apply the iptables filter with iptables-apply. Now it looks like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>root@spce:~# iptables -L -n -v<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>Chain INPUT (policy DROP 1 packets, 40 bytes)<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'>pkts bytes target prot opt in out source destination<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 45 10017 f2b-KAMAILIO all -- * * 0.0.0.0/0 0.0.0.0/0<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 49 10197 f2b-KAMAILIO all -- * * 0.0.0.0/0 0.0.0.0/0<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 58 31203 rtpengine udp -- * * 0.0.0.0/0 0.0.0.0/0<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 53 26575 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 45 9670 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 0<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 3 841 cluster all -- * * 0.0.0.0/0 0.0.0.0/0<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 1 761 ACCEPT udp -- eth0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:5060 /* sip_ext */<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5060 /* sip_ext */<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5061 /* sip_ext */<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5222 /* sip_ext */<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5269 /* sip_ext */<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT udp -- eth0 * 0.0.0.0/0 0.0.0.0/0 udp dpts:30000:44999 /* rtp_ext */<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 /* web_ext */<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1443 /* web_int */<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 0 0 ACCEPT tcp -- eth0 * 92.42.136.52 0.0.0.0/0 tcp dpt:22 /* ssh_ext */<o:p></o:p></span></i></p><p class=MsoNormal style='margin-left:35.4pt'><i><span lang=EN-US style='font-size:9.0pt'> 2 80 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limit: avg 5/min burst 10 LOG flags 0 level 7 prefix "NGCPFW[DROP]: "<o:p></o:p></span></i></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>So far so good BUT if I reboot the machine now, the iptables policies are removed and it looks like before I did the “iptables-apply” command.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>So I have to “iptables-apply” again, to have my iptables rules installed.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>The iptables settings are not reboot resistant.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I read the handbook carefully several times, but can’t find a solution for this behavior. Is this a bug?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US>SECOND:<o:p></o:p></span></b></p><p class=MsoNormal><span lang=EN-US>It looks like that the iptables-apply just set the rules for my eth0 interface, but not for eth1… How can I enable this rules for eth1 too?<o:p></o:p></span></p></div></body></html>