rc.firewall script - do I have an error?

Moderator: Forum moderators

Post Reply
mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

rc.firewall script - do I have an error?

Post by mow9902 »

Hi

When I examine the rc.firewall script in /etc/init.d I notice that line 14/15 says that "The save and restore arguments will save or restore the rules # from the /etc/sysconfig/iptables file."

However - on my fossapup64 system there is no directory /etc/sysconfig and therefore no iptables file in that directory.
Should there be?
Is this just an error on my system (which I may have created in my playing around), or is there an error in the rc.firewall script?

rc.firewall.png
rc.firewall.png (153.1 KiB) Viewed 1244 times
mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: rc.firewall script - do I have an error?

Post by mow9902 »

Please - could anyone with a fossapup64 system just do a quick check to see if the directory /etc/sysconfig exists on your system. If it does not, then I have to conclude that rc.firewall has an error in the script and I will alter my copy to fix it.

thanks

User avatar
Marv
Posts: 451
Joined: Fri Dec 20, 2019 3:09 am
Has thanked: 213 times
Been thanked: 120 times

Re: rc.firewall script - do I have an error?

Post by Marv »

Running fossapup64 9.5 currently. No directory /etc/sysconfig in my running system nor in the main SFS straight from the 9.5 iso.

My pups: LxPupSc64 and Voidpup64 with LXDE ydrv and synaptics touchpad drivers, both using small savefiles for customizations. Ydrv based NoblePup64 and Fossapup64-small (both LXDE/PCManFM with no savefiles). No fdrvs throughout. :thumbup2:

mow9902
Posts: 196
Joined: Fri Jul 24, 2020 11:57 pm
Has thanked: 15 times
Been thanked: 62 times

Re: rc.firewall script - do I have an error?

Post by mow9902 »

Thanks Marv

Looks like it is an error in the original script.

User avatar
mikewalsh
Moderator
Posts: 6159
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: rc.firewall script - do I have an error?

Post by mikewalsh »

@mow9902 :-

Nah. Not an "error", I don't think. If ya read the bumf, it was originally developed in 2002, then subsequently modified for Slackware by Eric Hameleers - "AlienBob" as he's known to 'Slackers'.

Mainstream distros contain a lot of often redundant/unnecessary stuff that usually gets stripped out of Puppy builds.

If you then read the very next sentence, the functions for which that particular script was originally written appear to be specific to RedHat & Fedora:-

"The save and restore arguments are included to preserve compatibility with Redhat's or Fedora's init.d script if you prefer to use it."

Looks like a 'legacy' item, from an earlier cycle of development. This script has been around for at least two decades, and has doubtless got modified by no end of different devs during its lifetime..!

(*shrug*)

Mike. ;)

Burunduk
Posts: 252
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: rc.firewall script - do I have an error?

Post by Burunduk »

I'm not an expert here, maybe someone will explain it better. From what I can see in Fossapup64, the /etc/init.d/rc.firewall script is generated automatically by the firewall configuration program (/usr/sbin/firewall_ng). It in itself contains all the settings in a form of iptables command lines. There is no need for an external configuration file.

User avatar
BarryK
Posts: 2692
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 132 times
Been thanked: 738 times

Re: rc.firewall script - do I have an error?

Post by BarryK »

I made some changes to firewall_ng:

https://github.com/bkauler/woofq/commit ... 5a62e6a272

But fossapup is very old, so perhaps the "-m state" still works, and perhaps don't have to run "iptables-legacy"

fr-ke
Posts: 107
Joined: Mon Nov 07, 2022 3:18 pm
Has thanked: 4 times
Been thanked: 35 times

Re: rc.firewall script - do I have an error?

Post by fr-ke »

I have another problem with firewall-ng as described here.

http://forum.puppylinux.com/viewtopic.p ... 964#p73290

dimkr
Posts: 2423
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 53 times
Been thanked: 1202 times

Re: rc.firewall script - do I have an error?

Post by dimkr »

The firewall part of woof-CE, at https://github.com/puppylinux-woof-CE/w ... irewall_ng. It's pretty much unmaintained, other than some IPv6-related fixes in 2022.

Post Reply

Return to “Security/Privacy”