LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-24-2008, 09:39 AM   #1
celebnavin
LQ Newbie
 
Registered: Oct 2007
Posts: 8

Rep: Reputation: 0
need help with ports....


well guys i wana block remote desktop access on my intranet....
m running RHEL4 as my distro n iptables for firewall.......


########################## my iptable file ###############################

*filter
:INPUT ACCEPT [65:6072]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]

-A INPUT -s 172.16.1.0/255.255.0.0 -i eth0 -d 192.168.0.0/24 -p tcp -j ACCEPT
-A FORWARD -s 172.16.1.0/255.255.0.0 -i eth0 -d 192.168.0.0/24 -o eth1 -p tcp -m state --state ESTABLISHED -j ACCEPT
-A FORWARD -d 172.16.1.0/255.255.0.0 -o eth0 -s 192.168.0.0/24 -i eth1 -p tcp -m state --state ESTABLISHED -j ACCEPT
-A INPUT -j ACCEPT -p all -s 172.16.1.0/255.255.0.0 -i eth0
-A OUTPUT -j ACCEPT -p all -d 172.16.1.0/255.255.0.0 -o eth0

COMMIT

*nat
:PREROUTING ACCEPT [14:2040]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -s 172.16.1.0/16 -o eth1 -j MASQUERADE

COMMIT

################################ end #################################

eth0 - i use it as a proxy address for surfing on the lan
eth1 - use it as gateway for lan
my modem connection is on eth0

i used this line in my iptables later but it didnt work---
iptables -A INPUT -p tcp -s 172.16.1.0/16 --dport 3389 -j DROP

neone plz help me.............is there smthing wrong with my iptables file or the command , hw should i do it.

thanks in advance.
 
Old 03-24-2008, 01:02 PM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
The INPUT chain only matches packets that are destined for the firewall machine itself, to block packets to your intranet you need the rule in the FORWARD chain.
 
  


Reply



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
Cannot Open Mail Server Ports 25, 110, and 220. Other Ports will open. Binxter Linux - Newbie 9 11-29-2007 02:03 AM
reject all ip & ports and allow only some ports with iptables ysar68 Linux - Security 1 05-12-2007 08:50 PM
USB 2.0 ports: devices not detected, but works fine with USB 1.1 ports (Kubuntu 6.06) KWTm Linux - Hardware 1 05-09-2007 04:42 AM
are outbound ports converged while local ports are ok ? inanc Linux - Networking 0 02-06-2007 10:37 AM
Ports badboyz2525 Linux - Newbie 4 12-20-2005 07:12 PM

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

All times are GMT -5. The time now is 03:09 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