LinuxQuestions.org
Register a domain and help support LQ
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 08-04-2003, 10:15 AM   #1
merlin371
Member
 
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, 10:25 AM   #2
Looking_Lost
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)

then

/etc/init.d/network restart

when I wanted it going again

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

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
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 1.2.3.4 -j DROP

Where ethX is whatever card the XP comes in on and 1.2.3.4 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.
 
  


Reply


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


All times are GMT -5. The time now is 08:06 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration