Activities

March 2011
M T W T F S S
« Feb   Apr »
 123456
78910111213
14151617181920
21222324252627
28293031  

APF : Adding custom rules in firewall

APF is installed on one of my server and I need to add one additional rule to apf firewall. I need to enable post routing in firewall for vpn server purpose.

It’s just simple add your iptables rules in “/etc/apf/postroute.rules

[root@godisgr8t ~]# cat  /etc/apf/postroute.rules | grep "iptables"
/sbin/iptables  -t nat -I POSTROUTING -s 10.10.10.0/24  -o eth1 -j MASQUERADE
[root@godisgr8t ~]# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  10.10.10.0/24        anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
[root@godisgr8t ~]#

2 comments to APF : Adding custom rules in firewall

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>