Originally Posted by
jsvidyad
Maybe I wasn't clear. ufw just sets the iptables rules, right?? I just wanted to know where the script that sets iptables rules at startup is and how it sets the iptables rules
You are correct, ufw is just a front end for iptables. I told you earlier in the post where the scripts that ufw loads at start up are located. To reiterate that point
UFW default rules (the policies and rules that come with UFW by default) are stored in
Code:
/etc/ufw/before.rules
/etc/ufw/after.rules
/etc/ufw/before6.rules
/etc/ufw/after6.rules
UFW user rules (rules created by you, example : allowing traffic to SSH) are stored in
Code:
/lib/ufw/user.rules
/lib/ufw/user6.rules
These files are loaded by UFW when it starts, if it is scheduled as an upstart job (starts at boot time) they will be loaded then. Otherwise they will be loaded when you give the
command.
As far as iptables goes, you can create a script anywhere to interact with that, starting an iptables script is often done either via an upstart job, using the service iptables-save command , or adding the iptables script to the network interface's pre-up.d startup scripts.
Outside of that I'm not sure what else you're looking for.
Bookmarks