All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohammad Khan <mkhan@lextranet.com>
To: varun_saa@vsnl.net, netfilter@lists.netfilter.org
Subject: Re: myrules comment
Date: Thu, 03 Feb 2005 01:18:49 -0500	[thread overview]
Message-ID: <1107411530.25774.16.camel@croaker> (raw)
In-Reply-To: <fbbd7fa78e.fa78efbbd7@vsnl.net>

On Thu, 2005-02-03 at 09:58 +0500, varun_saa@vsnl.net wrote:
> Hello,
>      My server is Mandrake 10.1
> eth0 is WAN with static IP connected to 512k DSL
> eth1 is LAN.
> 
> Basically I want clients to able to :
> 
> 1. send and recieve mails
> 
> 2. browse the net through squid
> 
> 3. Use MSN or Yahoo
> 
> 
> My iptables config is as follows :
> 
> # Generated by iptables-save v1.2.9 on Thu Oct 21 05:32:36 2004
> *nat
> :OUTPUT ACCEPT [0:0]
> :PREROUTING ACCEPT [0:0]
> :POSTROUTING ACCEPT [0:0]
> -A POSTROUTING -o eth0 -j MASQUERADE
> COMMIT
> # Completed on Thu Oct 21 05:32:36 2004
> # Generated by iptables-save v1.2.9 on Thu Oct 21 05:32:36 2004
> *mangle
> :PREROUTING ACCEPT [32056:3889577]
> :INPUT ACCEPT [32010:3885659]
> :FORWARD ACCEPT [0:0]
> :OUTPUT ACCEPT [31637:4617585]
> :POSTROUTING ACCEPT [31639:4618071]
> COMMIT
> # Completed on Thu Oct 21 05:32:36 2004
> # Generated by iptables-save v1.2.9 on Thu Oct 21 05:32:36 2004
> *filter
> :FORWARD DROP [0:0]
good

> :INPUT DROP [0:0]
good
> :OUTPUT ACCEPT [0:0]

> -A INPUT -j ACCEPT
You are accepting every packet
> -A INPUT -s 127.0.0.1 -j ACCEPT
rule unreachable
> -A INPUT -p tcp -m tcp -i eth1 --dport 3128 -j ACCEPT
rule unreachable
> -A INPUT -p udp -m udp -i eth1 --dport 3128 --sport 80 -j ACCEPT
> -A INPUT -s 62.0.0.0/255.0.0.0 -i eth0 -j REJECT
> -A INPUT -p tcp -m tcp -s 217.81.0.0/255.255.0.0 -i eth0 -j REJECT
> -A INPUT -i eth0 -j DROP
> -A INPUT -p tcp -m tcp -i eth1 --sport 80 -j DROP
> -A INPUT -m state -i eth1 --state ESTABLISHED,RELATED -j ACCEPT
all rule unreachable



> -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
> -A FORWARD -i eth1 -o eth0 -p tcp --syn --sport 1024 --dport 25 -j ACCEPT
> -A FORWARD -i eth1 -o eth0 -p tcp --syn --sport 1024 --dport 110 -j ACCEPT    
> COMMIT

You should IPTables-HowTo.


MOhammad



> # Completed on Thu Oct 21 05:32:36 2004
> 
> Please feel free to comment and correct.
> 
> 
> Thanks
> 
> Varun
> 
> 
> 



  reply	other threads:[~2005-02-03  6:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-03  4:58 myrules comment varun_saa
2005-02-03  6:18 ` Mohammad Khan [this message]
2005-02-03 14:18 ` Jason Opperisano
  -- strict thread matches above, loose matches on Subject: below --
2005-02-06  3:42 varun_saa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1107411530.25774.16.camel@croaker \
    --to=mkhan@lextranet.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=varun_saa@vsnl.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.