LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 08-11-2006, 05:09 AM   #1
iflorea
LQ Newbie
 
Registered: Jul 2003
Location: ro
Distribution: FC4
Posts: 15

Rep: Reputation: 0
iptables: should I ACCEPT incomming pakets for my outgoing connections?


I'm trying to understand iptables..
As I undestud if i don'n wand any connection from outside I should not ACCEPT any incomming connection.. but if i do so, the outgouig connections fails to... My PC does not Accept responses from connections initiated by me.
Did'n I get somethig?
Tanks,

My iptables-save is:
# Generated by iptables-save v1.3.0 on Fri Aug 11 12:59:12 2006
*nat
:OUTPUT ACCEPT [164:13722]
:POSTROUTING ACCEPT [164:13722]
:PREROUTING ACCEPT [248:45784]
COMMIT
# Completed on Fri Aug 11 12:59:12 2006
# Generated by iptables-save v1.3.0 on Fri Aug 11 12:59:12 2006
*filter
:FORWARD DROP [0:0]
:INPUT DROP [2647:1576110]
:OUTPUT ACCEPT [2068:310185]
COMMIT
# Completed on Fri Aug 11 12:59:12 2006
 
Old 08-11-2006, 05:13 AM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Yes, you need to track the connections and allow those connections that are related to your existing connections:

Code:
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
That appends a new rule to your INPUT chain that ACCEPTs those connections that are tracked to be related to some existing connections (started by you). Read more from
Code:
man iptables
I must apologize I don't have a Linux box to test if the command succeeds but if it doesn't, there's just some minor typing error. Try that out and if it fails, read the man page if I miswrote some part, though it should be like that.

Last edited by b0uncer; 08-11-2006 at 05:17 AM.
 
Old 08-11-2006, 06:51 AM   #3
iflorea
LQ Newbie
 
Registered: Jul 2003
Location: ro
Distribution: FC4
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks

Thanks a lot,
It works now..
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make X.org listen for incomming connections ? qwijibow Linux - General 24 12-23-2009 02:42 AM
My Ubuntu 5.10 server don't want outgoing connections salah1 Linux - Networking 0 05-14-2006 04:58 PM
a program to listen+accept incomming connection+echo packets ? qwijibow Linux - Software 0 03-01-2004 09:10 PM
firewall outgoing connections hotrodowner Linux - Security 2 02-22-2004 12:51 PM
outgoing connections DonMiner Linux - Networking 2 05-02-2003 09:51 AM


All times are GMT -5. The time now is 02:40 PM.

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