Networking Forums

Networking Forums > Computer Networking > Linux Networking > same netmask, Can not block my Ip properly

Reply
Thread Tools Display Modes

same netmask, Can not block my Ip properly

 
 
datavaults@hotmail.com
Guest
Posts: n/a

 
      01-04-2006, 01:48 AM


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

 
Reply With Quote
 
 
 
Reply

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the netmask in a DHCP server vv Windows Networking 2 04-21-2008 03:08 PM
Simple netmask question El CiD Linux Networking 1 10-12-2007 09:58 PM
IP Addresses and netmask Steve W Windows Networking 10 11-30-2004 11:51 PM
IP/Netmask, but no connection... Markus Dehmann Wireless Internet 0 09-04-2004 03:28 PM
MN-700 and netmask 255.255.255.255 Ignacio Machin \( .NET/ C# MVP \) Broadband Hardware 6 07-12-2004 02:19 PM



1 2 3 4 5 6 7 8 9 10 11