echo "Deletando os paranaue"
netsh advfirewall firewall delete rule name= paf12000tcp dir=in protocol=TCP localport=12000
netsh advfirewall firewall delete rule name= paf12000udp dir=in protocol=UDP localport=12000
netsh advfirewall firewall delete rule name= paf12000tcp dir=out protocol=TCP localport=12000
netsh advfirewall firewall delete rule name= paf12000udp dir=out protocol=UDP localport=12000
netsh advfirewall firewall delete rule name= paf13000tcp dir=in protocol=TCP localport=13000
netsh advfirewall firewall delete rule name= paf13000udp dir=in aprotocol=UDP localport=13000
netsh advfirewall firewall delete rule name= paf13000tcp dir=out protocol=TCP localport=13000
netsh advfirewall firewall delete rule name= paf13000udp dir=out protocol=UDP localport=13000
netsh advfirewall firewall delete rule name= nfeservidorTCP dir=in protocol=TCP localport=3082
netsh advfirewall firewall delete rule name= nfeservidorUDP dir=in protocol=UDP localport=3082
netsh advfirewall firewall delete rule name= nfeservidorTCP dir=out protocol=TCP localport=3082
netsh advfirewall firewall delete rule name= nfeservidorUDP dir=out protocol=UDP localport=3082



echo "################## Liberando portas PAF servidor remoto #############"
echo "Liberando porta de ENTRADA 12000 TCP"
netsh advfirewall firewall add rule name= paf12000tcp dir=in action=allow protocol=TCP localport=12000
echo "Liberando porta de ENTRADA 12000 UDP"
netsh advfirewall firewall add rule name= paf12000udp dir=in action=allow protocol=UDP localport=12000
echo "Liberando porta de SAIDA 12000 TCP"
netsh advfirewall firewall add rule name= paf12000tcp dir=out action=allow protocol=TCP localport=12000
echo "Liberando porta de SAIDA 12000 UDP"
netsh advfirewall firewall add rule name= paf12000udp dir=out action=allow protocol=UDP localport=12000

echo "################## Liberando portas PAF Central #####################"
echo "Liberando porta de ENTRADA 13000 TCP"
netsh advfirewall firewall add rule name= paf13000tcp dir=in action=allow protocol=TCP localport=13000
echo "Liberando porta de ENTRADA 13000 UDP"
netsh advfirewall firewall add rule name= paf13000udp dir=in action=allow protocol=UDP localport=13000
echo "Liberando porta de SAIDA 13000 TCP"
netsh advfirewall firewall add rule name= paf13000tcp dir=out action=allow protocol=TCP localport=13000
echo "Liberando porta de SAIDA 13000 UDP"
netsh advfirewall firewall add rule name= paf13000udp dir=out action=allow protocol=UDP localport=13000

echo "################## Liberando portas NF-e servidor ###################"
echo "Liberando porta de ENTRADA 3082 TCP"
netsh advfirewall firewall add rule name= nfeservidorTCP dir=in action=allow protocol=TCP localport=3082
echo "Liberando porta de ENTRADA 3082 UDP"
netsh advfirewall firewall add rule name= nfeservidorUDP dir=in action=allow protocol=UDP localport=3082
echo "Liberando porta de SAIDA 3082 TCP"
netsh advfirewall firewall add rule name= nfeservidorTCP dir=out action=allow protocol=TCP localport=3082
echo "Liberando porta de SAIDA 3082 UDP"
netsh advfirewall firewall add rule name= nfeservidorUDP dir=out action=allow protocol=UDP localport=3082



echo "Deletando os paranaue"
netsh advfirewall firewall delete rule name= eco3050tcp dir=in protocol=TCP localport=3050
netsh advfirewall firewall delete rule name= eco3050udp dir=in protocol=UDP localport=3050
netsh advfirewall firewall delete rule name= eco3050tcp dir=out protocol=TCP localport=3050
netsh advfirewall firewall delete rule name= eco3050udp dir=out protocol=UDP localport=3050

echo "################## Liberando portas Firebird ########################"
echo "Liberando porta de ENTRADA 3050 TCP"
netsh advfirewall firewall add rule name= eco3050tcp dir=in action=allow protocol=TCP localport=3050
echo "Liberando porta de ENTRADA 3050 UDP"
netsh advfirewall firewall add rule name= eco3050udp dir=in action=allow protocol=UDP localport=3050
echo "Liberando porta de SAIDA 3050 UDP"
netsh advfirewall firewall add rule name= eco3050tcp dir=out action=allow protocol=TCP localport=3050
echo "Liberando porta de SAIDA 3050 UDP"
netsh advfirewall firewall add rule name= eco3050udp dir=out action=allow protocol=UDP localport=3050
