Skip to content

Instantly share code, notes, and snippets.

@bajpangosh
Last active November 4, 2023 09:28
Show Gist options
  • Save bajpangosh/a0e6da5f9bfe6e5d3f9a2d25aa24588d to your computer and use it in GitHub Desktop.
Save bajpangosh/a0e6da5f9bfe6e5d3f9a2d25aa24588d to your computer and use it in GitHub Desktop.
port open
#!/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
@bajpangosh
Copy link
Author

ubuntu@wordpress:$ sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 8090 -j ACCEPT
ubuntu@wordpress:
$ sudo netfilter-persistent save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment