IPTables: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
(Created page with "==References== {| | valign="top" | * [https://www.howtogeek.com/177621/the-beginners-guide-to-iptables-the-linux-firewall/ IPTables » The Beginners Guide] * [https://www.cyberciti.biz/faq/how-to-list-all-iptables-rules-in-linux/ IPTables » Rules Listing] * [https://www.redhat.com/en/blog/iptables IPTables » RedHat] * [https://help.ubuntu.com/community/IptablesHowTo?action=show IPTables » How To] * [https://wiki.archlinux.org/title/Iptables IPTables] | valign="top" |...")
 
No edit summary
Line 1: Line 1:
==Playground==
{|
| valign="top" |
<syntaxhighlight lang="bash">
netstat -uap|grep nginx
apt list --installed
sudo iptables -S
netstat -lpn
netstat -a
</syntaxhighlight>
| valign="top" |
<syntaxhighlight lang="bash">
sudo ss -tulpn | grep LISTEN | grep resolve
sudo ss -tulpn | grep LISTEN | grep minio
sudo ss -tulpn | grep LISTEN | grep sshd
sudo ss -tulwn | grep LISTEN
sudo ss -tulpn | grep LISTEN
</syntaxhighlight>
| valign="top" |
<syntaxhighlight lang="bash">
sudo lsof -i -P -n | grep LISTEN
sudo ss -tulpn    | grep LISTEN
ls -lah /etc/iptables/
ls -lah /etc/iproute2/
ls -lah /etc/ufw/
</syntaxhighlight>
|-
|colspan='3'|
----
|-
|valign='top'|
<syntaxhighlight lang="bash">
nc -uv vpn.shahed.biz 1194  # udp
nc -tv vpn.shahed.biz 80    # tcp
nc -tv vpn.shahed.biz 53    # tcp
sudo nmap -sT localhost      # tcp
sudo nmap -sU localhost      # udp
nc -uv localhost 1194        # udp
nc -tv localhost 80          # tcp
</syntaxhighlight>
|valign='top'|
<syntaxhighlight lang="bash">
suod journalctl -xeu ufw.service
sudo journalctl -xeu iptables
sudo journalctl -xeu nftables
systemctl daemon-reload
journalctl -xe|less
journalctl -xe|tail
journalctl -xe
</syntaxhighlight>
|valign='top'|
<syntaxhighlight lang="bash">
sudo -i -u minikube
echo $(ip r g $(minikube ip)|awk '{print $3}'|head -n1)
sudo nmap -sU -sT -p U:1194,T:22,53,443 vpn.shahed.biz
nmap --packet-trace -p 587 -vv -sT mail.chorke.org
tracerout mail.chorke.org
</syntaxhighlight>
|-
|colspan='3'|
----
|-
|valign='top'|
<syntaxhighlight lang="bash">
apt install inetutils-traceroute
apt install nmap
</syntaxhighlight>
|valign='top'|
<syntaxhighlight lang="bash">
systemctl status iptables
systemctl status nftables
</syntaxhighlight>
|valign='top'|
|}
==References==
==References==
{|
{|

Revision as of 21:56, 20 December 2024

Playground

netstat -uap|grep nginx
apt list --installed
sudo iptables -S
netstat -lpn
netstat -a
sudo ss -tulpn | grep LISTEN | grep resolve
sudo ss -tulpn | grep LISTEN | grep minio
sudo ss -tulpn | grep LISTEN | grep sshd
sudo ss -tulwn | grep LISTEN
sudo ss -tulpn | grep LISTEN
sudo lsof -i -P -n | grep LISTEN
sudo ss -tulpn     | grep LISTEN
ls -lah /etc/iptables/
ls -lah /etc/iproute2/
ls -lah /etc/ufw/

nc -uv vpn.shahed.biz 1194   # udp
nc -tv vpn.shahed.biz 80     # tcp
nc -tv vpn.shahed.biz 53     # tcp
sudo nmap -sT localhost      # tcp
sudo nmap -sU localhost      # udp
nc -uv localhost 1194        # udp
nc -tv localhost 80          # tcp
suod journalctl -xeu ufw.service
sudo journalctl -xeu iptables
sudo journalctl -xeu nftables
systemctl daemon-reload
journalctl -xe|less
journalctl -xe|tail
journalctl -xe
sudo -i -u minikube
echo $(ip r g $(minikube ip)|awk '{print $3}'|head -n1)

sudo nmap -sU -sT -p U:1194,T:22,53,443 vpn.shahed.biz

nmap --packet-trace -p 587 -vv -sT mail.chorke.org
tracerout mail.chorke.org

apt install inetutils-traceroute
apt install nmap
systemctl status iptables
systemctl status nftables

References