LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2004, 05:58 AM   #1
enrique_arong
LQ Newbie
 
Registered: Apr 2004
Posts: 24

Rep: Reputation: 15
Angry iptables line


Hi

This is a newbie question.

I've got a linux server and have some pcs in my lab,
I would like to set a line with iptables command
that drops the internet to all the pcs in the lab except one.

is it like this ?

iptables -A INPUT -s ! pc with internet -p tcp -j DROP

thanks for your answers



Aaron
 
Old 06-09-2004, 02:46 PM   #2
mascdman
Member
 
Registered: Jun 2004
Location: Canada
Distribution: Ubuntu 6.06 LTS
Posts: 152

Rep: Reputation: 30
Do the lab PCs connect through the server to the internet (ie: the server is a gateway)? If so, try
Code:
iptables -A FORWARD -i eth? -s !pc -j REJECT
Replace the ? with the correct number of the interface that is connected to the lab.

--mascdman
 
  


Reply



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
bash shell script read file line by line. Darren[UoW] Programming 57 04-17-2016 06:07 PM
BASH: read every line in the files and use the line as parameters as another program tam3c36 Programming 10 12-07-2010 01:42 PM
C++ text file line by line/each line to string/array Dimitris Programming 15 03-11-2008 08:22 AM
simple Iptables line enrique_arong Linux - Networking 1 06-09-2004 07:14 AM
linux scripting help needed read from file line by line exc commands each line read atokad Programming 4 12-26-2003 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration