Company iptables configuration (eMule, nat, forward, input, output, state) (1)

Source: Internet
Author: User

CompanyIptables configurationAs follows:

Here is the current iptables configuration of the company (eth0 Is intranet, eth1 is connected to ADSL ):

 
 
  1. # Generated by iptables-save v1.2.8 on Sun Nov 25 16:13:01 2007  
  2.  
  3. *filter  
  4.  
  5. :INPUT DROP [0:0]  
  6.  
  7. :FORWARD ACCEPT [0:0]  
  8.  
  9. :OUTPUT ACCEPT [0:0]  
  10.  
  11. -A INPUT -i ppp0 -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j DROP  
  12.  
  13. -A INPUT -i lo -j ACCEPT  
  14.  
  15. -A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT  
  16.  
  17. -A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT  
  18.  
  19. -A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT  
  20.  
  21. -A INPUT -i eth0 -p tcp -m tcp --dport 139 -j ACCEPT  
  22.  
  23. -A INPUT -i eth0 -p tcp -m tcp --dport 445 -j ACCEPT  
  24.  
  25. -A INPUT -i eth0 -p tcp -m tcp --dport 123 -j ACCEPT  
  26.  
  27. -A INPUT -i eth0 -p udp -m udp --dport 123 -j ACCEPT  
  28.  
  29. -A INPUT -m state --state ESTABLISHED -j ACCEPT  
  30.  
  31. -A OUTPUT -o lo -j ACCEPT  
  32.  
  33. -A OUTPUT -p tcp -m tcp --sport 22 -j ACCEPT  
  34.  
  35. -A OUTPUT -p tcp -m tcp --sport 53 -j ACCEPT  
  36.  
  37. -A OUTPUT -p udp -m udp --sport 53 -j ACCEPT  
  38.  
  39. -A OUTPUT -p tcp -m tcp --sport 139 -j ACCEPT  
  40.  
  41. -A OUTPUT -p tcp -m tcp --sport 445 -j ACCEPT  
  42.  
  43. -A OUTPUT -p tcp -m tcp --sport 123 -j ACCEPT  
  44.  
  45. -A OUTPUT -p udp -m udp --sport 123 -j ACCEPT  
  46.  
  47. COMMIT  
  48.  
  49. # Completed on Sun Nov 25 16:13:01 2007  
  50.  
  51. # Generated by iptables-save v1.2.8 on Sun Nov 25 16:13:01 2007  
  52.  
  53. *nat  
  54.  
  55. :PREROUTING ACCEPT [3:162]  
  56.  
  57. :POSTROUTING ACCEPT [1:108]  
  58.  
  59. :OUTPUT ACCEPT [1:108]  
  60.  
  61. -A PREROUTING -i ppp0 -p tcp -m tcp --dport 7559 -j DNAT --to-destination 192.168.0.10:7559  
  62.  
  63. -A PREROUTING -i ppp0 -p udp -m udp --dport 7569 -j DNAT --to-destination 192.168.0.10:7569  
  64.  
  65. -A PREROUTING -i ppp0 -p tcp -m tcp --dport 28145 -j DNAT --to-destination 192.168.0.10:28145  
  66.  
  67. -A PREROUTING -i ppp0 -p udp -m udp --dport 28145 -j DNAT --to-destination 192.168.0.10:28145  
  68.  
  69. -A POSTROUTING -s 192.168.0.0/255.255.255.0 -o ppp0 -j MASQUERADE  
  70.  
  71. COMMIT  
  72.  
  73. # Completed on Sun Nov 25 16:13:01 2007  
  74.  


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.