From: "testmail" <testmail@peterpaul.com.ph>
To: Netfilter <netfilter@lists.netfilter.org>
Subject: Iptables Problems
Date: Thu, 2 Dec 2004 14:12:44 +0800 [thread overview]
Message-ID: <008201c4d835$eff08480$0200a8c0@etpi> (raw)
Hi,
Im using Fedora Core 2 and was trying iptables for the first time. I'm setting a firewall between the internet
and my private network wherein my server(behind firewall) is running FTP(wu-fptd) and SMB
My iptable configuration should be :
1. Filter all incomming FTP request (should have the ability to filter specific ip that is comming from the public network).
2. SMB request from the Internet should be block.
3. Drop all ports that is not being used by SMB and FTP.
4. Can browse the internet
My current iptable config is not working at all.......Please Help!
>>>>>Current Setup<<<<<<
Server Setup
1 network card with private ip eth0 and behind firewall
Iptable Config from Firewall and used also as a gateway.
Net Card
etho -- static ip from isp
eth1 -- private ip
FromInternetSourceIP = '222.222.222.222' sample ip
LocalIPFTPSMB = '192.168.0.2'
iptables -F
iptables -t nat -F
iptables -t mangle -F
# Set the default policy
iptables -t filter -A INPUT -j DROP
#Allow FTP Connection from this source ip
iptables -t filter -A INPUT -p tcp -s 192.168.0.1/24 -d $LocalIPFTPSMB --dport 20:21 -j ACCEPT
iptables -t filter -A INPUT -p tcp -s $FromInternetASourceIP -d LocalIPFTPSMB --dport 20:21 -j ACCEPT
# Smb Connections allowed from 192.168.0.1/24 network
iptables -A INPUT -i eth0 -p tcp -s 192.168.0.1/24 -d LocalIPFTPSMB --sport 137:139 -j ACCEPT
#Connect all WWW traffic using port 80
iptables -t nat -A POSTROUTING -s 192.168.0.1/24 -d 0/0 -p tcp --dport 80 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.1/24 -d 0/0-p tcp --dport 53 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.1/24 -d 0/0-p udp --dport 53 -j MASQUERADE
#For logging
iptables -A OUTPUT -j LOG
iptables -A INPUT -j LOG
iptables -A FORWARD -j LOG
Milo
next reply other threads:[~2004-12-02 6:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-02 6:12 testmail [this message]
2004-12-02 8:00 ` Iptables Problems a.ledvinka
2004-12-03 6:38 ` testmail
2004-12-02 8:30 ` a.ledvinka
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='008201c4d835$eff08480$0200a8c0@etpi' \
--to=testmail@peterpaul.com.ph \
--cc=netfilter@lists.netfilter.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox