[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#32465] Add iptables service

From: Ludovic Courtès
Subject: [bug#32465] Add iptables service
Date: Tue, 18 Sep 2018 16:39:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)


Arun Isaac <address@hidden> skribis:

>>> - Is the example I added for the iptables.rules sufficient? I couldn't
>>>   find upstream documentation for the iptables.rules format. I suspect
>>>   it doesn't exist. Do you know of any upstream documentation that can
>>>   be referred to here?
>> From a quick search it must be <>,
>> specifically 
>> <>.
> This is general documentation for netfilter, not specific documentation
> about the iptables.rules format. For that, I don't think there is
> upstream documentation.

Oh indeed.

>>> +        (stop #~(lambda _
>>> +                  (invoke #$iptables-restore #$%iptables-accept-all-rules)
>>> +                  (invoke #$ip6tables-restore 
>>> #$%iptables-accept-all-rules))))))))
>> There’s a peculiarity of ‘stop’ which is that it must return #f on
>> success.  So here, you just need to add a trailing #f after the second
>> ‘invoke’ call.  If you do that, I suppose the test that stops the
>> firewall will pass.
> There was one problem with stop-service being an unbound variable. I
> fixed that by adding (use-modules (gnu services herd)). But, now the
> test just freezes up. I wonder if it is waiting for some timeout. Here
> is the snippet for the test I am currently using. Also, returning #f
> from stop didn't make a difference.
> (test-assert "inetd echo service is accessible after iptables firewall is 
> stopped"
>   (begin
>     (marionette-eval
>      '(begin
>         (use-modules (gnu services herd))
>         (stop-service 'iptables))
>      marionette)
>     (wait-for-tcp-port inetd-echo-port marionette #:timeout 5)))

Do you see any messages on the console?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]