#!/bin/sh

if cat /etc/firewall.user | grep -e "^# QMP Masquerade options"; then exit 0; fi

cat << QMP >> /etc/firewall.user
# QMP Masquerade options
iptables -t nat -A POSTROUTING -s 172.16.0.0/12 ! -d 172.16.0.0/12 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.0/16 ! -d 192.168.0.0/16 -j MASQUERADE
QMP
