0% found this document useful (0 votes)
39 views1 page

Alexanderhd27 Iptables

This document provides a cheat sheet for basic iptables commands and common ports. It lists ports with their protocol and typical use, along with selectors and basic iptables commands for inserting, replacing, deleting, appending, listing, setting policy, resetting counters, flushing, creating chains, and renaming chains. Common protocols and their ports are also included for quick reference.

Uploaded by

Sergeo Armani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views1 page

Alexanderhd27 Iptables

This document provides a cheat sheet for basic iptables commands and common ports. It lists ports with their protocol and typical use, along with selectors and basic iptables commands for inserting, replacing, deleting, appending, listing, setting policy, resetting counters, flushing, creating chains, and renaming chains. Common protocols and their ports are also included for quick reference.

Uploaded by

Sergeo Armani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

iptables Cheat Sheet

by AlexanderHD27 (AlexanderHD27) via cheatography.com/162805/cs/39143/

Ports Basic Commands

Protocol Descri​ption Port TCP/UDP Descri​ption Descri​ption


FTP File Transfer Protocol 20,21 TCP Insert iptables -I <ch​ain> [rule-​number]
SSH Secure Shell 22 TCP [selec​tion]

SMTP Simple Mail Transfer Protocol 25 TCP Replace iptables -R <ch​ain> <ru​le-​num​ber>

HTTP Hypertext Transfer Protocol 80 TCP Delete iptables -D

DNS Domain Name System 53 TCP/UDP Append iptables -A

DHCP Dynamic Host Config​uration 67,68 UDP List iptables -L


Protocol Policy (Set policy) iptables -P <ch​ain> <po​lic​y>
OSPF Open Shortest Path First 89 IP Zero (Reset Counters in iptables -Z [chain [rule]]
POP3 Post Office Protocol version 3 110 TCP Chain)

NTP Network Time Protocol 123 UDP Flush (Delete all rules in iptables -F [chain]
chain)
IMAP Internet Message Access Protocol 143 TCP
New (Create user-d​efined iptables -N <ch​ain​-na​me>
BGP Border Gateway Protocol 179 TCP
chain)
IS-IS Interm​ediate System to Interm​ediate 149 IP
Rename (Rename user-d​‐ iptables -R <ch​ain> <ne​w-c​hai​n-n​‐
System
efined chain) ame>
SNMP Simple Network Management 161 UDP
Help iptables -h
Protocol
[Optional Parame​ter]; <Re​quired Parame​ter​>; "​sel​ect​ion​" is
HTTPS HTTP Secure 443 TCP
composed of one or more package selectors
SMB Server Message Block 445 TCP/UDP
L2TP Layer 2 Tunneling Protocol 1701 UDP Selectors
PPTP Point-​to-​Point Tunneling Protocol 1723 TCP
Descri​ption Selector Values
RTMP Real Time Messaging Protocol 1935 UDP
Protocol -p <pr​oto​col> tcp/ud​p/icmp
NFS Network File System 2049 TCP/UDP
Src Address -s <ip4 addres​s[/​Mas​‐ Source IP4 Address
RDP Remote Desktop Protocol 3389 TCP/UDP k]>
SIP Session Initiation Protocol 5060 UDP/TCP Dest Address -d <ip4 addres​s[/​Mas​‐ Destin​ation IP4 Address
IGMP Internet Group Management N/A IP k]>
Protocol Network -i <In​ter​fac​e> (e.g. eth0, wildcard: +)
RTP Real-time Transport Protocol N/A UDP Interace
Src Port --sport Source Port
Dest --dport Destin​ation Port
Goto -g <ch​ain> Chain name
Jump -j <ta​rge​t> ACCEPT, DROP,
REJECT

By AlexanderHD27 Not published yet. Sponsored by CrosswordCheats.com


(AlexanderHD27) Last updated 7th June, 2023. Learn to solve cryptic crosswords!
Page 1 of 1. http://crosswordcheats.com

cheatography.com/alexanderhd27/

You might also like