Bug 1312703 - tcpcryptd: Package systemd ExecStartPre/ExecStopPost script broken.
tcpcryptd: Package systemd ExecStartPre/ExecStopPost script broken.
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: tcpcrypt (Show other bugs)
23
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Paul Wouters
Fedora Extras Quality Assurance
:
Depends On: 1213128
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-28 19:51 EST by Edward O'Callaghan
Modified: 2016-12-20 14:05 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 14:05:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
firewalld ruleset (597 bytes, application/xml)
2016-02-29 16:53 EST, Edward O'Callaghan
no flags Details

  None (edit)
Description Edward O'Callaghan 2016-02-28 19:51:33 EST
Hi,

For the following package:

$ rpm -q tcpcrypt
tcpcrypt-0.4-0.4.bb990b1b.fc23.x86_64

Which contains the following files:

$ rpm -ql tcpcrypt
/run/tcpcryptd
/usr/bin/tcnetstat
/usr/bin/tcpcryptd
/usr/bin/tcpcryptd-firewall
/usr/bin/tcs
/usr/lib/systemd/system/tcpcryptd.service
/usr/lib/tmpfiles.d/tcpcrypt.conf
/usr/share/doc/tcpcrypt
/usr/share/doc/tcpcrypt/LICENSE
/usr/share/doc/tcpcrypt/README.markdown
/usr/share/man/man8/tcnetstat.8.gz
/usr/share/man/man8/tcpcryptd.8.gz

The following systemd manifest:

$ cat /usr/lib/systemd/system/tcpcryptd.service
[Unit]
Description=tcpcryptd Server
After=syslog.target network.target

[Service]
Type=simple
ExecStartPre=mkdir -p /var/run/tcpcryptd
ExecStartPre=/usr/bin/tcpcryptd-firewall start
ExecStart=/usr/bin/tcpcryptd -f -x 0x10
ExecStopPost=/usr/bin/tcpcryptd-firewall stop

[Install]
WantedBy=multi-user.target

Runs the following script:

$ cat /usr/bin/tcpcryptd-firewall 
#!/bin/sh

if [ "$1" == "start" ]
then
        iptables -t raw -N tcpcrypt
        iptables -t raw -A tcpcrypt -p tcp -m mark --mark 0x0/0x10 -j NFQUEUE --queue-num 666
        iptables -t raw -I PREROUTING -j tcpcrypt

        iptables -t mangle -N tcpcrypt
        iptables -t mangle -A tcpcrypt -p tcp -m mark --mark 0x0/0x10 -j NFQUEUE --queue-num 666
        iptables -t mangle -I POSTROUTING -j tcpcrypt
 
        # launch `tcpcryptd` with `-x 0x10`
fi
if [ "$1" == "stop" ]
then
        iptables -t raw -F tcpcrypt
        iptables -t raw -D PREROUTING -j tcpcrypt

        iptables -t mangle -F tcpcrypt
        iptables -t mangle -D PREROUTING -j tcpcrypt
fi


*However*, Fedora uses firewalld and not iptables by default and as such the script needs to be patched so that this package can work out the box in the excepted manner.

Kind Regards,
Edward.
Comment 1 Edward O'Callaghan 2016-02-29 16:53 EST
Created attachment 1131722 [details]
firewalld ruleset

Put in `/etc/firewalld/direct.xml' then run:

$ sudo firewall-cmd --reload
$ sudo firewall-cmd --direct --get-rules ipv4 raw tcpcrypt
$ sudo firewall-cmd --direct --get-rules ipv4 mangle tcpcrypt

However, checking http://tcpcrypt.org/test.php does not show things seem to work as expected :/ so there is still a minor issue somewhere?
Comment 2 Paul Wouters 2016-03-08 15:22:24 EST
note I pushed a fixed package in rawhide. But while it shows crypted status with tcnetstat, it causes packetflow issues to the test site tcpcrypt.org, so I'm talking to upstream about what's going on.
Comment 3 Edward O'Callaghan 2016-04-17 06:24:18 EDT
(In reply to Paul Wouters from comment #2)
> note I pushed a fixed package in rawhide. But while it shows crypted status
> with tcnetstat, it causes packetflow issues to the test site tcpcrypt.org,
> so I'm talking to upstream about what's going on.

Thank you for keeping this up to date Paul, please continue to do so!
Comment 4 Fedora End Of Life 2016-11-24 10:49:13 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 5 Fedora End Of Life 2016-12-20 14:05:33 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.