Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chcp 28591 > nul
- :mode
- echo off
- title Configuraciones de puerto para FiveM
- mode con cols=78 lines=32
- color 0
- cls
- goto :permission
- :permission
- openfiles>nul 2>&1
- if %errorlevel% EQU 0 goto :menu
- echo.
- echo. Ejecute el script en modo Administrador
- echo.
- echo. Presione cualquier tecla para cerrar . . .
- pause>nul
- goto :close
- :menu
- cls
- title Configuraciones de puerto para FiveM
- echo.
- echo. Opciones:
- echo.
- echo. 1. Agregar reglas para abrir puertos
- echo. 2. Eliminar reglas para cerrar puertos
- echo.
- echo. 0. Cerrar
- echo.
- set /p option=Choissisez une option:
- if %option% EQU 0 (
- goto close
- ) else if %option% EQU 1 (
- call :add_rule
- ) else if %option% EQU 2 (
- call :remove_rule
- ) else (
- echo.
- echo.Opcion invalida.
- echo.
- echo.Pulse cualquier tecla para continuar . . .
- pause>nul
- )
- goto menu
- :add_rule
- cls
- title Agregar reglas en el firewall de Windows ...
- echo.
- echo Agregar reglas en el firewall de Windows ...
- echo.
- netsh advfirewall firewall add rule name="FiveM port TCP 30130 IN" dir=in action=allow protocol=TCP localport=30130
- netsh advfirewall firewall add rule name="FiveM port UDP 30130 IN" dir=in action=allow protocol=UDP localport=30130
- netsh advfirewall firewall add rule name="FiveM port TCP 30120 IN" dir=in action=allow protocol=TCP localport=30120
- netsh advfirewall firewall add rule name="FiveM port UDP 30120 IN" dir=in action=allow protocol=UDP localport=30120
- netsh advfirewall firewall add rule name="FiveM port TCP 30110 IN" dir=in action=allow protocol=TCP localport=30110
- netsh advfirewall firewall add rule name="FiveM port UDP 30110 IN" dir=in action=allow protocol=TCP localport=30110
- netsh advfirewall firewall add rule name="FiveM port TCP 30130 OUT" dir=out action=allow protocol=TCP localport=30130
- netsh advfirewall firewall add rule name="FiveM port UDP 30130 OUT" dir=out action=allow protocol=UDP localport=30130
- netsh advfirewall firewall add rule name="FiveM port TCP 30120 OUT" dir=out action=allow protocol=TCP localport=30120
- netsh advfirewall firewall add rule name="FiveM port UDP 30120 OUT" dir=out action=allow protocol=UDP localport=30120
- netsh advfirewall firewall add rule name="FiveM port TCP 30110 OUT" dir=out action=allow protocol=TCP localport=30110
- netsh advfirewall firewall add rule name="FiveM port UDP 30110 OUT" dir=out action=allow protocol=TCP localport=30110
- cls
- title Reglas agregadas
- echo.
- echo. Las reglas se han agregado al firewall de Windows.
- echo. No se requiere otra configuración.
- echo.
- echo. Presione cualquier tecla para cerrar. . .
- pause>nul
- goto :close
- :remove_rule
- cls
- title Eliminando reglas del Firewall de Windows ...
- echo.
- echo. Eliminar reglas del Firewall de Windows ...
- netsh advfirewall firewall delete rule name="FiveM port TCP 30120 IN"
- netsh advfirewall firewall delete rule name="FiveM port UDP 30120 IN"
- netsh advfirewall firewall delete rule name="FiveM port TCP 30110 IN"
- netsh advfirewall firewall delete rule name="FiveM port UDP 30110 IN"
- netsh advfirewall firewall delete rule name="FiveM port TCP 30120 OUT"
- netsh advfirewall firewall delete rule name="FiveM port UDP 30120 OUT"
- netsh advfirewall firewall delete rule name="FiveM port TCP 30110 OUT"
- netsh advfirewall firewall delete rule name="FiveM port UDP 30110 OUT"
- cls
- title Reglas suprimidas
- echo.
- echo. Las reglas se han eliminado del firewall de Windows.
- echo. No se requiere otra configuración.
- echo.
- echo. Presione cualquier tecla para cerrar. . .
- pause>nul
- goto :close
- :close
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement