Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- Title Easy Firewall
- cls
- :menu
- echo.
- echo Please note that Easy Firewall only opens it in your firewall and not your
- echo. router!
- echo.
- echo --------------------------------------------------------------------------------
- echo Easy Firewall by Inforcer25
- echo --------------------------------------------------------------------------------
- echo.
- echo.
- echo.
- echo.
- echo.
- echo Select a Option
- echo ================
- echo.
- echo [1] Open Port (TCP)
- echo [2] Open Port (UDP)
- echo [3] Allow program (BETA!)
- echo [4] Exit
- echo.
- set /p op=Option:
- if %op%==1 goto open_tcp
- if %op%==2 goto open_udp
- if %op%==3 goto allow_program
- if %op%==4 goto exit
- goto error
- rem =================================================================================================
- :open_tcp
- cls
- @echo off
- echo.
- echo "Please enter port"
- set /p tcp_port=Port:
- echo.
- echo "Please enter name of rule"
- set /p tcp_rule=Name:
- echo.
- netsh firewall add portopening tcp %tcp_port% "%tcp_rule%" >nul
- ping localhost -n 5 >nul
- cls
- echo.
- echo.
- echo.
- echo The port is now open!
- echo.
- echo Press Enter to go to the menu.
- pause >nul
- goto menu
- rem =================================================================================================
- :open_udp
- cls
- @echo off
- echo.
- echo "Please enter port"
- set /p udp_port=Port:
- echo.
- echo "Please enter name of rule"
- set /p udp_rule=Name:
- echo.
- netsh firewall add portopening udp %udp_port% "%udp_rule%" >nul
- ping localhost -n 5 >nul
- cls
- echo.
- echo.
- echo.
- echo The port is now open!
- echo.
- echo Press Enter to go to the menu.
- pause >nul
- goto menu
- rem =================================================================================================
- :allow_program
- cls
- @echo off
- echo.
- echo Please not that this option is in beta!
- echo.
- echo (Program path Eg. "C:\program files\Skype.exe")
- echo.
- echo "Enter Program Path" (Don't add qoutes)
- set /p pro_path=Program Path:
- echo.
- netsh firewall add allowedprogram "%pro_path%" cobain enable >nul
- ping localhost -n 5 >nul
- cls
- echo.
- echo.
- echo.
- echo The program is now allowed!
- echo.
- echo Press Enter to go to the menu.
- pause >nul
- goto menu
- rem =================================================================================================
- :error
- cls
- @echo off
- echo.
- echo.
- ECHO OOPS Wrong Option!
- ping localhost -n 5 >nul
- goto menu
- rem =================================================================================================
- :exit
- exit
- rem =================================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement