byghis

iptables help

Sep 10th, 2011
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. edward@pituba:~$ sudo iptables --version
  2. iptables v1.4.10
  3.  
  4. edward@pituba:~$ sudo iptables --help
  5. iptables v1.4.10
  6.  
  7. Usage: iptables -[AD] chain rule-specification [options]
  8. iptables -I chain [rulenum] rule-specification [options]
  9. iptables -R chain rulenum rule-specification [options]
  10. iptables -D chain rulenum [options]
  11. iptables -[LS] [chain [rulenum]] [options]
  12. iptables -[FZ] [chain] [options]
  13. iptables -[NX] chain
  14. iptables -E old-chain-name new-chain-name
  15. iptables -P chain target [options]
  16. iptables -h (print this help information)
  17.  
  18. Commands:
  19. Either long or short options are allowed.
  20. --append -A chain Append to chain
  21. --delete -D chain Delete matching rule from chain
  22. --delete -D chain rulenum
  23. Delete rule rulenum (1 = first) from chain
  24. --insert -I chain [rulenum]
  25. Insert in chain as rulenum (default 1=first)
  26. --replace -R chain rulenum
  27. Replace rule rulenum (1 = first) in chain
  28. --list -L [chain [rulenum]]
  29. List the rules in a chain or all chains
  30. --list-rules -S [chain [rulenum]]
  31. Print the rules in a chain or all chains
  32. --flush -F [chain] Delete all rules in chain or all chains
  33. --zero -Z [chain [rulenum]]
  34. Zero counters in chain or all chains
  35. --new -N chain Create a new user-defined chain
  36. --delete-chain
  37. -X [chain] Delete a user-defined chain
  38. --policy -P chain target
  39. Change policy on chain to target
  40. --rename-chain
  41. -E old-chain new-chain
  42. Change chain name, (moving any references)
  43. Options:
  44. [!] --proto -p proto protocol: by number or name, eg. `tcp'
  45. [!] --source -s address[/mask][...]
  46. source specification
  47. [!] --destination -d address[/mask][...]
  48. destination specification
  49. [!] --in-interface -i input name[+]
  50. network interface name ([+] for wildcard)
  51. --jump -j target
  52. target for rule (may load target extension)
  53. --goto -g chain
  54. jump to chain with no return
  55. --match -m match
  56. extended match (may load extension)
  57. --numeric -n numeric output of addresses and ports
  58. [!] --out-interface -o output name[+]
  59. network interface name ([+] for wildcard)
  60. --table -t table table to manipulate (default: `filter')
  61. --verbose -v verbose mode
  62. --line-numbers print line numbers when listing
  63. --exact -x expand numbers (display exact values)
  64. [!] --fragment -f match second or further fragments only
  65. --modprobe=<command> try to insert modules using this command
  66. --set-counters PKTS BYTES set the counter during insert/append
  67. [!] --version -V print package version.
  68. edward@pituba:~$ sudo iptables --version
  69. iptables v1.4.10
Advertisement
Add Comment
Please, Sign In to add comment