[+]Problem przy restarcie iptables w Debian 8.4

Tematy związane z oprogramowaniem, instalacją, konfiguracją
ddebny
Posty: 17
Rejestracja: 12 stycznia 2013, 14:57

[+]Problem przy restarcie iptables w Debian 8.4

Post autor: ddebny »

sudo service iptables restart

"failed to restart iptables.service unit iptables.service failed to load no such file or directory"

W czym tkwi problem? Mam czysty netinstall x64 8.4. W x32 jest to samo.
Ostatnio zmieniony 09 maja 2016, 10:11 przez ddebny, łącznie zmieniany 1 raz.
Awatar użytkownika
dedito
Moderator
Posty: 3586
Rejestracja: 18 listopada 2013, 21:07
Lokalizacja: Gliwice

Re: Problem przy restarcie iptables w Debian 8.4

Post autor: dedito »

Paczka jest?

Kod: Zaznacz cały

dpkg -l | grep iptables
ddebny
Posty: 17
Rejestracja: 12 stycznia 2013, 14:57

Re: Problem przy restarcie iptables w Debian 8.4

Post autor: ddebny »

Wynik:

ii iptables 1.4.21-2+b1 i386 admin
instration tool for packet filtering and NAT
Awatar użytkownika
Yampress
Administrator
Posty: 6420
Rejestracja: 09 sierpnia 2007, 21:41
Lokalizacja: PL

Re: Problem przy restarcie iptables w Debian 8.4

Post autor: Yampress »

[root@debian /home/yampress]# service iptables
iptables: unrecognized service
[root@debian /home/yampress]#
Nie ma iptables w services.
To jest polecenie dawno nie używanego sysvinit, który teraz jest zastąpiony przez systemd
Jakieś stare masz materiały do nauki.
ddebny
Posty: 17
Rejestracja: 12 stycznia 2013, 14:57

Re: Problem przy restarcie iptables w Debian 8.4

Post autor: ddebny »

To jak dać restart jeśli w wersji debiana 8.4 nie ma go w /etc/init.d ? W debianie 7 iptables jest w init.d.
Wprowadziłem nowe dane MASQUERADE i potrzebuję dać resa.
Awatar użytkownika
Yampress
Administrator
Posty: 6420
Rejestracja: 09 sierpnia 2007, 21:41
Lokalizacja: PL

Re: Problem przy restarcie iptables w Debian 8.4

Post autor: Yampress »

Gdzie, co i jak wprowadziłeś?
Skąd miałeś informacje, że tam, to trzeba wprowadzać?
ddebny
Posty: 17
Rejestracja: 12 stycznia 2013, 14:57

Re: Problem przy restarcie iptables w Debian 8.4

Post autor: ddebny »

Uczę się routingu. Połączenie pomiędzy maszynami już mam, ale eth1 nie pobiera neta z eth0 tak więc potrzebuję zrobić MASQUERADE. Po wprowadzeniu regułek:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT

Potrzebuję zrobić restart. Myślałem, że iptables działa na zasadzie usługi.
Awatar użytkownika
Yampress
Administrator
Posty: 6420
Rejestracja: 09 sierpnia 2007, 21:41
Lokalizacja: PL

Re: Problem przy restarcie iptables w Debian 8.4

Post autor: Yampress »

Nie działa.
restarty usługi = weź i wyczyyść wszystkie reguły firewala. Są do tego polecenia.
ddebny
Posty: 17
Rejestracja: 12 stycznia 2013, 14:57

Re: Problem przy restarcie iptables w Debian 8.4

Post autor: ddebny »

Ok :)
Czyli wprowadzone reguły powinny działać od razu?
Awatar użytkownika
Yampress
Administrator
Posty: 6420
Rejestracja: 09 sierpnia 2007, 21:41
Lokalizacja: PL

Re: Problem przy restarcie iptables w Debian 8.4

Post autor: Yampress »

No tak
Są reguły które czyszczą wszystkie wprowadzone wcześniej reguły.
Zablokowany