Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2020
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. chcp 28591 > nul
  2. :mode
  3. echo off
  4. title Configuraciones de puerto para FiveM
  5. mode con cols=78 lines=32
  6. color 0
  7. cls
  8. goto :permission
  9. :permission
  10. openfiles>nul 2>&1
  11. if %errorlevel% EQU 0 goto :menu
  12. echo.
  13. echo. Ejecute el script en modo Administrador
  14. echo.
  15. echo. Presione cualquier tecla para cerrar . . .
  16. pause>nul
  17. goto :close
  18. :menu
  19. cls
  20. title Configuraciones de puerto para FiveM
  21. echo.
  22. echo. Opciones:
  23. echo.
  24. echo. 1. Agregar reglas para abrir puertos
  25. echo. 2. Eliminar reglas para cerrar puertos
  26. echo.
  27. echo. 0. Cerrar
  28. echo.
  29. set /p option=Choissisez une option:
  30. if %option% EQU 0 (
  31. goto close
  32. ) else if %option% EQU 1 (
  33. call :add_rule
  34. ) else if %option% EQU 2 (
  35. call :remove_rule
  36. ) else (
  37. echo.
  38. echo.Opcion invalida.
  39. echo.
  40. echo.Pulse cualquier tecla para continuar . . .
  41. pause>nul
  42. )
  43. goto menu
  44. :add_rule
  45. cls
  46. title Agregar reglas en el firewall de Windows ...
  47. echo.
  48. echo Agregar reglas en el firewall de Windows ...
  49. echo.
  50. netsh advfirewall firewall add rule name="FiveM port TCP 30130 IN" dir=in action=allow protocol=TCP localport=30130
  51. netsh advfirewall firewall add rule name="FiveM port UDP 30130 IN" dir=in action=allow protocol=UDP localport=30130
  52. netsh advfirewall firewall add rule name="FiveM port TCP 30120 IN" dir=in action=allow protocol=TCP localport=30120
  53. netsh advfirewall firewall add rule name="FiveM port UDP 30120 IN" dir=in action=allow protocol=UDP localport=30120
  54. netsh advfirewall firewall add rule name="FiveM port TCP 30110 IN" dir=in action=allow protocol=TCP localport=30110
  55. netsh advfirewall firewall add rule name="FiveM port UDP 30110 IN" dir=in action=allow protocol=TCP localport=30110
  56. netsh advfirewall firewall add rule name="FiveM port TCP 30130 OUT" dir=out action=allow protocol=TCP localport=30130
  57. netsh advfirewall firewall add rule name="FiveM port UDP 30130 OUT" dir=out action=allow protocol=UDP localport=30130
  58. netsh advfirewall firewall add rule name="FiveM port TCP 30120 OUT" dir=out action=allow protocol=TCP localport=30120
  59. netsh advfirewall firewall add rule name="FiveM port UDP 30120 OUT" dir=out action=allow protocol=UDP localport=30120
  60. netsh advfirewall firewall add rule name="FiveM port TCP 30110 OUT" dir=out action=allow protocol=TCP localport=30110
  61. netsh advfirewall firewall add rule name="FiveM port UDP 30110 OUT" dir=out action=allow protocol=TCP localport=30110
  62. cls
  63. title Reglas agregadas
  64. echo.
  65. echo. Las reglas se han agregado al firewall de Windows.
  66. echo. No se requiere otra configuración.
  67. echo.
  68. echo. Presione cualquier tecla para cerrar. . .
  69. pause>nul
  70. goto :close
  71. :remove_rule
  72. cls
  73. title Eliminando reglas del Firewall de Windows ...
  74. echo.
  75. echo. Eliminar reglas del Firewall de Windows ...
  76. netsh advfirewall firewall delete rule name="FiveM port TCP 30120 IN"
  77. netsh advfirewall firewall delete rule name="FiveM port UDP 30120 IN"
  78. netsh advfirewall firewall delete rule name="FiveM port TCP 30110 IN"
  79. netsh advfirewall firewall delete rule name="FiveM port UDP 30110 IN"
  80. netsh advfirewall firewall delete rule name="FiveM port TCP 30120 OUT"
  81. netsh advfirewall firewall delete rule name="FiveM port UDP 30120 OUT"
  82. netsh advfirewall firewall delete rule name="FiveM port TCP 30110 OUT"
  83. netsh advfirewall firewall delete rule name="FiveM port UDP 30110 OUT"
  84. cls
  85. title Reglas suprimidas
  86. echo.
  87. echo. Las reglas se han eliminado del firewall de Windows.
  88. echo. No se requiere otra configuración.
  89. echo.
  90. echo. Presione cualquier tecla para cerrar. . .
  91. pause>nul
  92. goto :close
  93. :close
  94. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement