LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-11-2003, 01:36 AM   #1
zaldyd
LQ Newbie
 
Registered: May 2003
Posts: 20

Rep: Reputation: 0
iptables help!!! pls....


this will be the network setup:

WWW eth0 210.14.28.25
------ ---------------
| I |<----------------| Gateway | eth1 195.1.200.8
------ ---------------
^ ^ ^ ^
______________| | | |______________
| | | |
| ____| |____ |
| | | |
------- ------- -------- --------
| W1| |W2 | | W3 | | W4 |
------- ------- -------- --------
195...10 195...11 195...12 195...13

only W1,W4 access the internet.
what will be the iptables rules??
 
Old 07-11-2003, 07:56 AM   #2
seabass55
Member
 
Registered: Jan 2003
Location: 127.0.0.1
Distribution: Fedora&Gentoo
Posts: 207

Rep: Reputation: 30
You've got some reading to do
http://www.netfilter.org/

Where did you get the gatway and LAN IP addresses from? Did you just make up a number?

Do some work and we can help you fine tune it (like only allowing W1 and W4 on the internet. Hell we can make it some W1 and W4 are only allowed online at certain times even. Just show some incentive.
 
Old 07-11-2003, 09:39 AM   #3
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
the iptables rule you would want to disallow traffic to a given IP is.

iptables -A POSTROUTING -t nat -s $BLOCKED_IP -j REJECT

that one might work or you could do this;

iptables -A FORWARD -s $BLOCKED_IP -d ! $LAN -j REJECT


$BLOCKED_IP would be the ip address
$LAN is the LAN like 192.168.0.1/24 or something to that affect

you could also block based on the MAC address but i have never
written a rule for the MAC but its something like -m mac and some
other stuff.

do "man iptables" and also do what seabass55 said and check
out the netfilter website.

Also you could do a search fo r "iptables" on this site and find many examples.
 
Old 07-15-2003, 01:10 AM   #4
zaldyd
LQ Newbie
 
Registered: May 2003
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks 4 help...
 
  


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
Pls. Help -- How to block a client by iptables? swmok Linux - Security 2 09-08-2004 02:14 PM
pls help!!! iptables patch for IMQ device target debloxie Linux - Networking 0 03-03-2004 05:16 AM
Pls check my iptables to see if i can login into hotmail and other SSL sites! debloxie Linux - Networking 1 01-26-2004 09:33 AM
pls pls pls help me ! i'm tired with httpd config on fedora apache 2.0.48 AngelOfTheDamn Fedora 0 01-24-2004 05:12 PM
IPtables Noob Help pls Phat420 Linux - Networking 6 03-11-2003 09:55 PM

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

All times are GMT -5. The time now is 10: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