running.fw

Customer support forums for Atomic Protector (formerly Atomic Secured Linux). There is no such thing as a bad question here as long as it pertains to using Atomic Protector. Newbies feel free to get help getting started or asking questions that may be obvious. Regular users are asked to be gentle. :-)
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

running.fw

Unread post by faris »

What does /etc/asl/firewall/running.fw actually do? When does it get written to? Read from?

The reason I ask is that I had a situation where an IP was shunned, and it was shown as shunned in running.fw as well as in iptables -L. But when I unblocked it in ASL and whitelisted it, both via the Blocking window), the running.fw file (and the data shown in the firewall window) then showed the IP being shunned and allowed at the same time. Manually removing the shun entry from the firewall window in the ASL GUI removed the shun entry in the file.

[[ The circumstances that led to this may not be typical as I was in the middle of switching a system from APF to the ASL firewall which was turned out to be a bit messy on this occasion for some reason ]]
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Imaging
Forum Regular
Forum Regular
Posts: 346
Joined: Sat Sep 25, 2010 2:46 pm

Re: running.fw

Unread post by Imaging »

faris:

Would you mind posting the general procedure you follow to go from APF to the ASL Firewall?

We have one such box that we've been thinking of moving strictly to the ASL Firewall.

Thanks.
User avatar
hostingg
Forum User
Forum User
Posts: 63
Joined: Mon Mar 18, 2013 6:26 pm
Location: Earth

Re: running.fw

Unread post by hostingg »

i dont think youre supposed to modify that file. it seems like its generated dynamically when you save rules from asl.
If everything was easy, then the world wouldn't need engineers.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: running.fw

Unread post by scott »

The short version is it is a snapshot of the running firewall policy when you are accessing the firewall interface. I don't recommend modifying that file unless you are me.

We are planning conversion tools to automate migrations from other firewall interfaces into the ASL interface. We'll be taking that on after the 4.0 release (which is soon!)
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: running.fw

Unread post by faris »

ok....this is what I *think* I did and is somewhat based on http://www.atomicorp.com/forum/viewtopic.php?f=3&t=6695

1) Add allowed IPs (e.g. your own) to the ASL firewall via the GUI (Firewall, add rule, INPUT chain, INSERT, enter IP in SRC box, jump to ACCEPT)

2) Logout of GUI

3) service iptables stop

4) disabled iptables auto-start (using chkconfig or ntsysv)

5) delete /etc/cron.daily/apf

6) Disable APF auto-start (checkcfg or ntsysv)

7) Check for anything related to "refresh" or "apf" in /etc/cron.hourly or /etc/cron.daily or /etc/cron.d/ and remove or comment out.

8) Delete apf script itself (wherever it might be). This should not be necessary if you have completely killed off cron jobs that start it.

9) Add allowed ports in ASL GUI (main config, not firewall section)
http://www.atomicorp.com/wiki/index.php/ASL_firewall

WARNING: Read what it says in the GUI for what is default setting for each firewall switch. You will find some are enabled when they should be disabled, and vice versa. DROP_INVALID_LOG, for example, needs to be OFF otherwise you may find IPs get shunned for the wrong reason.

10) Stop APF/Flush rules:
apf -f (YOUR FIREWALL IS DOWN AT THIS POINT)


11) aum -u

12) asl -s -f

13) Check to see if APF has been expunged:
iptables -v -n -L | less

Use service asl-firewall-restart if need be

And it was at this point that things got in a mess for me. On one system I had to delete /etc/asl/firewall/running.fw because it had APF firewall rules in it, and nothing I did could get rid of them - they kept re-appearing. So maybe it was because I was logged in to the GUI and things got confused. I really don't know.


WARNING: You could lock yourself out of your system if anything I have written is in the wrong order or just plain wrong. Be warned.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Imaging
Forum Regular
Forum Regular
Posts: 346
Joined: Sat Sep 25, 2010 2:46 pm

Re: running.fw

Unread post by Imaging »

Great, thanks for posting.
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: running.fw

Unread post by faris »

Oh, one more thing. If you delete running.fw, you are likely to remove all your "allow IP" rules. This is potentially bad and can lock you out. I suggest allowing port 22 temporarily by adding it to your normally open ports in the main asl config.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: running.fw

Unread post by mikeshinn »

FYI, we are working on a migration tool to "suck in" existing rules upon install. As soon as its available well let everyone know.
Post Reply