[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) |
Hi,
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 <https://netfilter.org/documentation/>,
>> specifically
>> <https://netfilter.org/documentation/HOWTO//packet-filtering-HOWTO.html>.
>
> This is general documentation for netfilter, not specific documentation
> about the iptables.rules format. For that, I don't think there is
> upstream documentation.
>
> https://unix.stackexchange.com/questions/400163/netfilter-iptables-restore-file-format-documentation/400203
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?
Thanks,
Ludo’.
- [bug#32465] Add iptables service, Ludovic Courtès, 2018/09/04
- [bug#32465] Add iptables service, Julien Lepiller, 2018/09/04
- [bug#32465] Add iptables service, Arun Isaac, 2018/09/05
- [bug#32465] Add iptables service, Arun Isaac, 2018/09/14
- [bug#32465] Add iptables service, Ludovic Courtès, 2018/09/17
- [bug#32465] Add iptables service, Arun Isaac, 2018/09/18
- [bug#32465] Add iptables service,
Ludovic Courtès <=
- [bug#32465] Add iptables service, Arun Isaac, 2018/09/18
- [bug#32465] Add iptables service, Ludovic Courtès, 2018/09/19
- bug#32465: Add iptables service, Arun Isaac, 2018/09/20