![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Linux Support Linux - Operating Systems and Applications Support |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jul 2008
Posts: 2
OS: Vista Sp1
|
Iptables guide
i have used linux before (mandrake, ubuntu/kubuntu) with a gui and never really had to dig into the guts of the kernal. now i have a vds and i need help with confiquring and enabling iptables, i have tired installing APF to manage this for me, but the install went wrong (didnt find this out until after spending 2 hours editting the conf.apf file) and i wanted to know if there is a reasonably easy guide out there that can help me get iptables confiqured correctly. im looking to block both incoming/outgoing udp/tcp port ranges and setting which ports i want to be in htm mode. my vds is running fedora core 6 with cpanel/whm. thank you in advance to any reply's and help :)
Last edited by FiLeBaRoN; 07-23-2008 at 03:51 PM. |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) | |
|
Registered User
Join Date: Dec 2006
Location: UK
Posts: 229
OS: PCLinux2009/Ubuntu/XP
|
Re: Iptables guide
Quote:
Theres no easy guides but the wiki has simple examples http://en.wikipedia.org/wiki/Iptables and later in the document links to external links, man iptables is a good source for doc also |
|
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Jul 2008
Location: MManila
Posts: 3
OS: JagzOS
|
Re: Iptables guide
best practice for firewall making is to deny everything.
and open just what you need there are 3 tables in iptables filter, nat, and mangle, the default is filter. the syntax is like this; iptables [tables]/[options]/[interface]/[protocol]/[ipaddress][ports][conditions] note: this is not the respective parameters sample: # flusing in chains iptables -F # flush user-define chains iptables -X # table nat iptables -t nat -F iptables -t nat -X # table mangle iptables -t mangle -F iptables -t mangle -X # set all default rules to DROP iptables -P INPUT DROP iptables -P OUTPUT DROP iptables -P FORWARD DROP # allow loopback connections # for incoming connection iptables -A INPUT -i lo -j ACCEPT # for outgoing connections iptables -A OUTPUT -o lo -j ACCEPT # user specific rules and policy starts here |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Jul 2008
Location: MManila
Posts: 3
OS: JagzOS
|
Re: Iptables guide
for the in and out sample rules
# incoming http connection (port 80) iptables -A INPUT -i eth0 -s 0/0 --source-port 1024:65535 -d 192.168.0.1 --destination-port 80 -j ACCEPT # outgoing http (reply) iptables -A OUTPUT -o eth0 -s 192.168.0.1 --source-port 80 -d 0/0 --destination-port 1024:65535 -j ACCEPT |
|
|
|
![]() |
| Thread Tools | |
|
|