Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

same netmask, Can not block my Ip properly

Reply
 
Thread Tools Display Modes
  #1  
Old 01-04-2006, 02:48 AM
Default same netmask, Can not block my Ip properly





my eth0 is 196.40.74.126 netmask 255.255.255.240 , gateway is
196.40.74.113 , eth1 196.40.74.125 netmask 255.255.255.240.

it is not a normal network. but my ISP told me have to work this way.
normally the outbound interface has a dfferent netmast than the
inbound interface.

seems that the access fine from outside.



I used this script to block my 196.40.74.116( netmask is
255.255.255.240, gateway is 196.40.74.125) , but not successfully , can
any one tell me why?

any help is appreicated.

# Generated by iptables-save v1.2.11 on Tue Jan 3 08:39:30 2006
*filter
:INPUT ACCEPT [16:792]
:FORWARD DROP [101:5872]
:OUTPUT ACCEPT [34:2692]
:RH-Firewall-1-INPUT - [0:0]
:insideOnly - [0:0]
-A INPUT -d 196.40.74.126 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j DROP
-A FORWARD -d 196.40.74.116 -i eth0 -o eth1 -p tcp -m tcp --dport 80 -j
DROP
-A FORWARD -i eth0 -o eth1 -j ACCEPT
-A FORWARD -i eth1 -o eth0 -j ACCEPT
-A insideOnly -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A insideOnly -i ! eth0 -m state --state NEW -j ACCEPT
COMMIT
# Completed on Tue Jan 3 08:39:30 2006
# Generated by iptables-save v1.2.11 on Tue Jan 3 08:39:30 2006
*nat
:PREROUTING ACCEPT [30:5452]
:POSTROUTING ACCEPT [12:4200]
:OUTPUT ACCEPT [0:0]
COMMIT
# Completed on Tue Jan 3 08:39:30 2006



datavaults@hotmail.com
Reply With Quote
Reply

Tags
block, netmask, properly

Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:18 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.