LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-20-2005, 07:01 AM   #1
ninjaz
Member
 
Registered: Aug 2003
Location: Michigan
Distribution: RHEL v.4, Debian
Posts: 82

Rep: Reputation: 15
iptables firewall


I have a NAT set up on my linux box and now I'm trying to get the fire wall working. What I want to have is just the firewall to block everything and then punch holes for the different services that are running. When I do this though it seems to block everything, even the services that I have running (ie my web server). My output from the tables are:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp spt:10000
ACCEPT tcp -- anywhere anywhere tcp spt:http
ACCEPT tcp -- anywhere anywhere tcp spt:domain
ACCEPT udp -- anywhere anywhere udp spt:domain
ACCEPT tcp -- anywhere anywhere tcp spt:ssh
DROP all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Thanks,
Jason
 
Old 10-20-2005, 09:21 AM   #2
ninjaz
Member
 
Registered: Aug 2003
Location: Michigan
Distribution: RHEL v.4, Debian
Posts: 82

Original Poster
Rep: Reputation: 15
I am also getting an error message everytime I apply new settings:
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: raw filter mangle nat [FAILED]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
 
Old 10-20-2005, 11:19 AM   #3
iron_death
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Rep: Reputation: 0
Re: iptables firewall

For blocking all incoming traffic you must set default input policy to DROP.

Code:
#iptables -P INPUT DROP
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables with iptables-firewall.conf arno's matt3333 Slackware 16 06-28-2007 08:20 AM
How does my iptables firewall look? gian2oo1 Linux - Security 2 10-20-2005 09:27 PM
iptables vs. rc.firewall FiveFlat Linux - Security 2 08-13-2004 04:39 PM
IPTABLES firewall Vs rc firewall netguy2000 Linux - Security 7 02-28-2004 05:31 AM
IPTables Firewall bfloeagle Linux - Security 6 06-19-2001 03:51 PM


All times are GMT -5. The time now is 02:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration