Discussion Locked

Blocking Ip Ranges in RH 7.2

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Running Redhat 7.2, using Dhcp to connect to my Dsl Provider, how can I configure this box to only allow a specific IP range and what would the syntax be to specify a range say (not the real one by the way) 2.45.86.1-254 with a class C subnet
Just trying to do some simple security.

7 replies

by cpfeiffe

You want to look up ipchains or use the Red Hat firewall to be more detailed. Either method will allow you to block addresses. To allow 2.45.86.1-254 you would just configure a firewall object representing 2.45.86 with a 24 bit netmask and allow that object. In ipchains you could just allow 2.45.86. I hope this helps.

by lintadsl

Simple tips,

IPCHAINS -A INPUT -s 2.45.86.0/24 -p tcp -y -j ACCEPT ---make sure this is all in one line---

Above command will allow all 2.45.86.0-254 segment to access on TCP protocol. Class C subnet should be 192.168.0.0/255.255.255.0

Good Luck,

This discussion is closed to new replies.