Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-04-2003, 11:15 AM   #1
Registered: Jul 2003
Location: Italy
Distribution: Ubuntu/Fedora
Posts: 152

Rep: Reputation: 30
IP blocking

I have a computer with linux wich i do the server with and i have another one with XP i need to block the computer with XP cause people just come and use the internet making the whole thing crazy but i need internet on that machine is there something i can set on iptables so that it can accept or refuse an ip address whever i want it to?
Old 08-04-2003, 11:25 AM   #2
Senior Member
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
Do you mean the XP connects to the internet via the linux and there are times you want the XP still to have access to the internet but nobody using it or there are times you just don't want it to have access to the internet?

If it's the second one my brilliant solution would be to either

pull the network cable out of the card that's connected to XP (if that's how it's set up)

or do

ifconfig eth0 down (or whatever interface it is)


/etc/init.d/network restart

when I wanted it going again

If it's the first scenario not too sure
Old 08-04-2003, 11:42 AM   #3
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 420Reputation: 420Reputation: 420Reputation: 420Reputation: 420
You could have two firewall scripts. They would be exactly the same, except that the one that would block the XP machine would have something like

iptables-A INPUT -i ethX -s -j DROP

Where ethX is whatever card the XP comes in on and is the ip address for the XP machine.

Whenever you want to block the XP machine, you just run the script with this line and when you want it to have access you run the script without that line.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Port Blocking adtomar Linux - Networking 6 12-14-2004 04:35 AM
Non blocking file IO bstark Programming 5 12-01-2004 01:36 PM
Blocking IP Addresses toejam Linux - Security 2 05-01-2004 01:14 AM
IP Blocking Help mortsahl Linux - Security 2 04-26-2004 09:29 AM
Blocking porn shea1roh Linux - Software 0 08-14-2003 09:11 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration