Jump to content
aelius

Iptables Basics

Recommended Posts

In loc de "--destination-port" puteti folosi "--dport" . Mai multe exemple:

--sport = port sursa

--dport = port destinatie

Aici este o inexactitate in tutorial:

"The chains INPUT and OUTPUT are usually set to ACCEPT by default and FORWARD is set to DENY"

Politica default pe cele trei chain-uri este ACCEPT. Metoda de a face deny pe ce nu ne este necesar este putin cam proasta. Cel mai corect, este sa setam default policy DROP pe toate chain-urile, apoi sa acceptam doar ce ne este necesar. (Ma refer la firewall design)

Exemplu:

# We all gotta D I E !!!!!!!!!

# Note: Do not fucking do "iptables -F" ; do not flush the rules.

# All packets will be blocked, default policy is DROP.

iptables --policy INPUT DROP

iptables --policy OUTPUT DROP

iptables --policy FORWARD DROP

..... aici puteti continua doar cu regulile de accept la ce va este necesar pentru servicii, orice alt port/protocol este blocat default.

Edited by aelius
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...