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-26-2004, 03:41 PM   #1
geniarse
Member
 
Registered: May 2003
Location: UK
Distribution: Gentoo
Posts: 141

Rep: Reputation: 15
iptables config probs


I am configuring my iptables for a basic firewall: my configuration is (from iptables -L)

Code:
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp-data
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https
ACCEPT     all  --  localhost            anywhere
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootpc

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere
ACCEPT     udp  --  anywhere             anywhere
however trying to access network addresses can't be resolved despite port 53 (tcp dpt:domain) being open. Where have I gone wrong???

cheers

Last edited by geniarse; 10-26-2004 at 03:45 PM.
 
Old 10-27-2004, 04:16 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You will want to allow establised and related connections back in:
/sbin/iptables -A INPUT -m --state ESTABLISHED,RELATED -j ACCEPT
 
Old 10-28-2004, 12:59 PM   #3
geniarse
Member
 
Registered: May 2003
Location: UK
Distribution: Gentoo
Posts: 141

Original Poster
Rep: Reputation: 15
hmm, thanks for the help bu i get this error:

Code:
iptables v1.2.11: Couldn't load match `--state':/lib/iptables/libipt_--state.so: cannot open shared object file: No such file or directory
 
Old 10-28-2004, 01:09 PM   #4
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
change to -m state --state
If this doesn't work then you might not have the state module compiled.
 
Old 10-28-2004, 01:18 PM   #5
geniarse
Member
 
Registered: May 2003
Location: UK
Distribution: Gentoo
Posts: 141

Original Poster
Rep: Reputation: 15
cheers that woked, just to make things clea for ppl visiting this page in need of help the command was:

Code:
/sbin/iptables -A INPUT -m --state ESTABLISHED,RELATED -j ACCEPT
 
  


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
Probs with Iptables nogetfx Linux - Security 2 04-10-2005 04:46 PM
Debian XFree86 Config probs dthomson Debian 3 05-10-2004 09:15 AM
Having probs installing iptables-1.2.9 pembo13 Linux - Software 0 03-27-2004 09:42 AM
dxr3 / hw+ compilation/config probs mr_mandrill Slackware 46 09-01-2002 08:00 PM
Network config probs boltar Linux - Networking 2 06-17-2001 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration