LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-09-2004, 07:26 AM   #1
enrique_arong
LQ Newbie
 
Registered: Apr 2004
Posts: 24

Rep: Reputation: 15
Smile simple 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
 
Old 06-09-2004, 08:14 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
you will need to do thtat with FORWARD instead of INPUT ... also will require to enable MASQUERADING

iptables -t filter -A FORWARD -s ! <my pc> -d <external ip> -j DROP

Last edited by ppuru; 06-09-2004 at 08:15 AM.
 
  


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
Simple IPTABLES problem zahoo Linux - Networking 2 03-09-2005 10:43 PM
Simple / quick GUI on the command line ? michael_util Programming 3 01-05-2005 06:08 PM
iptables line enrique_arong Linux - Newbie 1 06-09-2004 03:46 PM
booting linux in simple command line tombomb300 Linux - Newbie 1 10-18-2003 02:49 PM
Simple help in Linux command line daeojkim Programming 3 09-30-2003 11:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:25 PM.

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