Skip to content

Instantly share code, notes, and snippets.

@bajpangosh
Last active November 4, 2023 09:28
Show Gist options
  • Select an option

  • Save bajpangosh/a0e6da5f9bfe6e5d3f9a2d25aa24588d to your computer and use it in GitHub Desktop.

Select an option

Save bajpangosh/a0e6da5f9bfe6e5d3f9a2d25aa24588d to your computer and use it in GitHub Desktop.

Revisions

  1. bajpangosh revised this gist Dec 7, 2022. No changes.
  2. bajpangosh created this gist Nov 21, 2021.
    7 changes: 7 additions & 0 deletions port.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/bin/bash
    # GET ALL USER INPUT
    sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT
    sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT
    sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 7080 -j ACCEPT
    sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 8080 -j ACCEPT
    sudo netfilter-persistent save