View previous topic :: View next topic |
Author |
Message |
xtrace Tux's lil' helper
Joined: 17 May 2010 Posts: 76
|
Posted: Tue Mar 10, 2015 7:57 pm Post subject: [S] Iptables startet nicht mehr |
|
|
Hallo!
Ich habe seit kurzem das Problem, daß iptables leider nicht mehr startet:
Quote: |
systemctl start iptables
|
Code: |
Failed to start iptables.service: Unit iptables.service failed to load: Invalid argument. See system logs and 'systemctl status iptables.service' for details.
|
Quote: |
systemctl status iptables.service
|
Code: |
● iptables.service - Store and restore iptables firewall rules
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Mär 10 20:51:09 xtrace systemd[1]: iptables.service lacks ExecStart setting. Refusing.
Mär 10 20:51:23 xtrace systemd[1]: iptables.service lacks ExecStart setting. Refusing.
|
Kann mir evtl. jmd. weiterhelfen?
Danke!
cu,
xtrace
Last edited by xtrace on Thu Mar 12, 2015 7:27 am; edited 1 time in total |
|
Back to top |
|
|
__bjoern n00b
Joined: 12 Oct 2014 Posts: 28
|
Posted: Tue Mar 10, 2015 11:40 pm Post subject: |
|
|
Hi,
ich hab mal einen Blick in die betroffene servide Datei geworfen:
Code: |
# cat /usr/lib/systemd/system/iptables.service
[Unit]
Description=Store and restore iptables firewall rules
[Install]
Also=iptables-store.service
Also=iptables-restore.service
|
Auszug aus der Handbuchseite zu .service Dateien:
Quote: |
Service files must include a "[Service]" section, which carries information about the service and the process it supervises.
|
Diese .service Datei kann so also nicht funktionieren, da die Service-Sektion fehlt. Möglicherweise hat das in früheren Versionen noch funktioniert. Hast du ein systemd-Update gemacht?
Das ist evt. ein Kandidat für einen Bug-Report. |
|
Back to top |
|
|
xtrace Tux's lil' helper
Joined: 17 May 2010 Posts: 76
|
Posted: Wed Mar 11, 2015 7:07 am Post subject: |
|
|
Hallo,
ich habe eine systemd Update gemacht. Richtig.
Ich werde mal versuchen die Datei aus einem Backup zu bekommen.
Danke. |
|
Back to top |
|
|
xtrace Tux's lil' helper
Joined: 17 May 2010 Posts: 76
|
Posted: Wed Mar 11, 2015 8:09 pm Post subject: |
|
|
Hallo,
ich habe die alte Datei gefunden. Damit funktioniert es:
Code: |
[Unit]
Description=iptables
Before=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/iptables
ExecStart=/sbin/iptables-restore ${SAVE_RESTORE_OPTIONS} ${IPTABLES_SAVE}
ExecStop=/usr/sbin/iptables-stop
[Install]
WantedBy=multi-user.target
|
Komisch...nach dem Update war sie weg.
Danke.
cu,
xtrace |
|
Back to top |
|
|
__bjoern n00b
Joined: 12 Oct 2014 Posts: 28
|
Posted: Wed Mar 11, 2015 9:07 pm Post subject: |
|
|
Hi,
ist diese Datei aus einer älteren Version des iptables Packet? Wenn nein, unter welchem Pfad war sie? |
|
Back to top |
|
|
xtrace Tux's lil' helper
Joined: 17 May 2010 Posts: 76
|
Posted: Thu Mar 12, 2015 7:27 am Post subject: |
|
|
Guten Morgen, __bjoern!
die Datei habe ich aus einem Backup gezogen. Sie war genau an der Stelle, die du mir genannt hast (im Backup).
Warum sie sich aufeinmal geändert hat, kann ich dir nicht sagen. Das hat wahrscheinlich mit dem Update zu tun gehabt (?).
Jedenfalls lief vor dem Update alles "normal".
cu,
xtrace |
|
Back to top |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Thu Mar 12, 2015 9:57 am Post subject: |
|
|
Die neue Datei war schon richtig, diese sorgt dafür, dass bei einem systemctl enable die richtigen Service Files, iptables-store.service und iptables-restore.service aktiviert werden.
Wenn Ihr iptables per Hand starten und stoppen wollt, müsstet Ihr diese aufrufen.
Im falle des Update sollte:
Code: | systemctl disable iptables
systemctl enable iptables |
Eigentlich ausreichend sein.
Bye
Py |
|
Back to top |
|
|
__bjoern n00b
Joined: 12 Oct 2014 Posts: 28
|
Posted: Thu Mar 12, 2015 1:52 pm Post subject: |
|
|
@xtrace: Ok, dann ist das ganze wohl bei einem Update von iptables in die Hose gegangen. Wundert mich, dass sich noch niemand anders gemeldet hat.
@py-ro: Also laut der mir zitierten Dokumentation ist eine .service Date ohne [service] Sektion aber ungültig, was xtrace ja hier bestätigt hat. In meinem System sieht die iptables Service Datei genau so aus. Kannst du mal bei dir überprüfen, ob deine .service Datei genauso aussieht und ein "systemctl start iptables" richtig funktioniert? Ich kann das leider nicht tun da ich kein systemd drauf hab. |
|
Back to top |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Thu Mar 12, 2015 2:23 pm Post subject: |
|
|
Nein, ein systemctrl start funktioniert nicht, aber ich hab das ja oben auch schon erklärt, wie das gedacht ist. |
|
Back to top |
|
|
|