LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-31-2006, 06:13 AM   #16
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69

Could you post the ouput of iptables -vnL?
 
Old 01-31-2006, 07:53 PM   #17
stormrider_may
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 304

Original Poster
Rep: Reputation: 30
Here it is...

Code:
Chain INPUT (policy ACCEPT 5414 packets, 494K bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0        state INVALID
    0     0 ACCEPT     tcp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0        tcp dpt:81
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0        tcp dpt:2121
  781 46980 DROP       tcp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0        tcp dpts:0:65500

Chain FORWARD (policy ACCEPT 10066 packets, 7581K bytes)
 pkts bytes target     prot opt in     out     source               destination
   37  2220 TCPMSS     tcp  --  *      ppp0    0.0.0.0/0            0.0.0.0/0        tcp flags:0x06/0x02 tcpmss match 1400:1536 TCPMSS clamp to PMTU
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0        icmp type 8 limit: avg 1/sec burst 5
    5   200 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0        tcp flags:0x17/0x04 limit: avg 1/sec burst 5

Chain OUTPUT (policy ACCEPT 7284 packets, 9155K bytes)
 pkts bytes target     prot opt in     out     source               destination
 
Old 01-31-2006, 09:03 PM   #18
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
I'd recommend adding a rule to allow traffic that is in the ESTABLISHED or RELATED states. When you are using your web browser like lynx, the outgoing traffic will use destination port 80 and a semi-random source port >1023. Therefore the reply packets from the webserver will be returned on the same random destination port >1023 with source port 80 (so just the reverse of the outgoing packets). This also explains why opening ports 1024-65500 helps the problem.

The easiest and most secure way of solving this problem is to use iptables state tracking mechanism to accept these reply packets. Something like this should work:

iptables -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

Note that this will only accept incoming traffic that is in reply to connections that *you* initiate.
 
  


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
SSH Server - How and how safe? Jorek Linux - Networking 9 10-27-2005 05:12 PM
Is it safe to show server stats? six6 Linux - Security 3 08-05-2005 12:31 PM
how safe it is to use linux/window in one hd ngan_yine Linux - Hardware 3 10-11-2004 03:58 PM
win98 Server, as safe as it gets ;-) browny_amiga General 12 06-26-2003 08:04 AM
setting up a safe and secure server/router Ciccio Linux - Security 3 04-25-2003 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:49 AM.

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