def set_fw_rules():
 subprocess.call(('iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination %s:%s' % (NETWORK_GW_IP, PORT)), shell=True)
 subprocess.call(('iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to-destination %s:%s' % (NETWORK_GW_IP, 53)), shell=True)
 subprocess.call(('iptables -t nat -A PREROUTING -p tcp --dport 53 -j DNAT --to-destination %s:%s' % (NETWORK_GW_IP, 53)), shell=True)
 subprocess.call(('iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination %s:%s' % (NETWORK_GW_IP, SSL_PORT)), shell=True)

def set_fw_rules ( ) : subprocess . call ( ( 'iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination %s:%s' % ( NETWORK_GW_IP , PORT ) ) , shell = True ) subprocess . call ( ( 'iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to-destination %s:%s' % ( NETWORK_GW_IP , 53 ) ) , shell = True ) subprocess . call ( ( 'iptables -t nat -A PREROUTING -p tcp --dport 53 -j DNAT --to-destination %s:%s' % ( NETWORK_GW_IP , 53 ) ) , shell = True ) subprocess . call ( ( 'iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination %s:%s' % ( NETWORK_GW_IP , SSL_PORT ) ) , shell = True )
set iptable rules .