Ubuntu/iptables

From r00tedvw.com wiki
Revision as of 22:46, 24 April 2014 by R00t (Talk | contribs)

Jump to: navigation, search
iptables
allows you to configure network ports and more


lookup current active rules

iptables -L -n -v

remove a rule from IP Tables

iptables -D INPUT 1

specify policy default

-P INPUT DROP

allow anything from itself (loopback)

-A INPUT -i lo -j ACCEPT

allow connection from specific address, inbound, using only TCP on a specific port

-A INPUT -s ip.address -p tcp --dport 22 -j ACCEPT

allow related and established

-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

delete chain from iptables

iptables -X chain.name

save current IP Tables config

sudo sh -c "iptables-save > /etc/iptables.rules"

restore IP Tables config (also add this line to rc.local for it to auto run during boot)

iptables-restore < /etc/iptables.rules
Personal tools
Namespaces

Variants
Actions
Navigation
Mediawiki
Confluence
DevOps Tools
Ubuntu
Ubuntu 22
Mac OSX
Oracle Linux
AWS
Windows
OpenVPN
Grafana
InfluxDB2
TrueNas
OwnCloud
Pivotal
osTicket
OTRS
phpBB
WordPress
VmWare ESXI 5.1
Crypto currencies
HTML
CSS
Python
Java Script
PHP
Raspberry Pi
Canvas LMS
Kaltura Media Server
Plex Media Server
MetaSploit
Zoneminder
ShinobiCE
Photoshop CS2
Fortinet
Uploaded
Certifications
General Info
Games
Meal Plans
NC Statutes
2020 Election
Volkswagen
Covid
NCDMV
Toolbox