Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[S] Iptables startet nicht mehr
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
xtrace
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2010
Posts: 76

PostPosted: Tue Mar 10, 2015 7:57 pm    Post subject: [S] Iptables startet nicht mehr Reply with quote

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
View user's profile Send private message
__bjoern
n00b
n00b


Joined: 12 Oct 2014
Posts: 28

PostPosted: Tue Mar 10, 2015 11:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
xtrace
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2010
Posts: 76

PostPosted: Wed Mar 11, 2015 7:07 am    Post subject: Reply with quote

Hallo,
ich habe eine systemd Update gemacht. Richtig.
Ich werde mal versuchen die Datei aus einem Backup zu bekommen.

Danke.
Back to top
View user's profile Send private message
xtrace
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2010
Posts: 76

PostPosted: Wed Mar 11, 2015 8:09 pm    Post subject: Reply with quote

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. :oops:
Danke.

cu,
xtrace
Back to top
View user's profile Send private message
__bjoern
n00b
n00b


Joined: 12 Oct 2014
Posts: 28

PostPosted: Wed Mar 11, 2015 9:07 pm    Post subject: Reply with quote

Hi,

ist diese Datei aus einer älteren Version des iptables Packet? Wenn nein, unter welchem Pfad war sie?
Back to top
View user's profile Send private message
xtrace
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2010
Posts: 76

PostPosted: Thu Mar 12, 2015 7:27 am    Post subject: Reply with quote

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
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Thu Mar 12, 2015 9:57 am    Post subject: Reply with quote

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
View user's profile Send private message
__bjoern
n00b
n00b


Joined: 12 Oct 2014
Posts: 28

PostPosted: Thu Mar 12, 2015 1:52 pm    Post subject: Reply with quote

@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
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Thu Mar 12, 2015 2:23 pm    Post subject: Reply with quote

Nein, ein systemctrl start funktioniert nicht, aber ich hab das ja oben auch schon erklärt, wie das gedacht ist.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum