Iptables Konfiguration in BionicPup permanent speichern?

Post Reply
Message
Author
User avatar
MaPi
Posts: 22
Joined: Fri 13 Jan 2017, 15:04

Iptables Konfiguration in BionicPup permanent speichern?

#1 Post by MaPi »

Wenn die Firewall eingeschaltet ist kann ich keine pptp Verbindung über wlan0 aufbauen.

Als Lösung habe ich folgende Befehle im Terminal eingegeben:


iptables -A INPUT -i wlan0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i wlan0 -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
iptables -A FORWARD -i ppp+ -o wlan0 -j ACCEPT
iptables -A FORWARD -i wlan0 -o ppp+ -j ACCEPT

Danach funktioniert die pptp Verbindung. Allerdings funktioniert das Abspeichern der Konfiguration mit "service iptables save" nicht (unrecognized service). Wie kann ich dieses Problem lösen?

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

Re: Iptables Konfiguration in BionicPup permanent speichern?

#2 Post by s243a »

MaPi (google translate) wrote:If the firewall is turned on, I can not establish a pptp connection over wlan0.

As a solution, I have entered the following commands in the terminal:


iptables -A INPUT -i wlan0 -p tcp -dport 1723 -j ACCEPT
iptables -A INPUT -i wlan0 -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
iptables -A FORWARD -i ppp + -o wlan0 -j ACCEPT
iptables -A FORWARD -i wlan0 -o ppp + -j ACCEPT

Then the pptp connection works. However, saving the configuration with "service iptables save" does not work. How can I solve this problem?
Are those commands that you entered or were they created by puppy's firewall? If these are your commands then you can put them in the following file to have them executed during startup. /etc/rc.d/rc.local

Anyway, the puppy firewall is pretty basic. It just blocks ports of protocal's that you aren't using. If you want said protocol to work then you need to open up the appropriate port.

Google Translate:

----------------------------------


Google Übersetzer:

[quote = "MaPi"] Wenn die Firewall eingeschaltet ist, kann ich keine pptp-Verbindung über wlan0 aufbauen.

Als Lösung habe ich folgende Befehle im Terminal eingegeben:


iptables -A INPUT -i wlan0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i wlan0 -p gre -j ACCEPT
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
iptables -A FORWARD -i ppp + -o wlan0 -j ACCEPT
iptables -A FORWARD -i wlan0 -o ppp + -j ACCEPT

Danach funktioniert die pptp Verbindung. Allerdings funktioniert das Abspeichern der Konfiguration mit "service iptables save" nicht. Wie kann ich dieses Problem lösen? [/ Quote]

Sind diese Befehle, die Sie eingegeben haben, oder wurden sie von der Welpen-Firewall erstellt? Wenn dies Ihre Befehle sind, können Sie sie in die folgende Datei einfügen, damit sie beim Start ausgeführt werden. /etc/rc.d/rc.local

Wie auch immer, die Welpen-Firewall ist ziemlich einfach. Es blockiert nur Ports von Protokollen, die Sie nicht verwenden. Wenn das Protokoll funktionieren soll, müssen Sie den entsprechenden Port öffnen.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

User avatar
MaPi
Posts: 22
Joined: Fri 13 Jan 2017, 15:04

#3 Post by MaPi »

Vielen Dank. Dieser Lösungsvorschlag funktioniert perfekt.

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#4 Post by s243a »

Many thanks. This solution works perfectly.
I'm glad it worked for you. On another note, it seems that in newer versions of puppy the iptables commands have been moved to /etc/init.d/rc.firewall. This startup script is generated by the script fiewall_ng.

Google Translate:
MaPi wrote:Vielen Dank. Dieser Lösungsvorschlag funktioniert perfekt.
Ich bin froh, dass es für dich funktioniert hat. In neueren Versionen von puppy scheinen die iptables-Befehle nach /etc/init.d/rc.firewall verschoben worden zu sein. Dieses Startskript wird vom Skript fiewall_ng generiert.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

Post Reply