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 12-04-2004, 02:46 PM   #1
fugzi
LQ Newbie
 
Registered: Aug 2003
Distribution: gentoo
Posts: 9

Rep: Reputation: 0
Blocking traffic


i post a question yesterday and got quick replies and was able to figure out what i had to do based on the answers. thanks for all the help. yesterdays post

now today there is a new question. i want to block all traffic to a specific interface accept one url/ip address. and on the other interface i want to block that specific url/ip address and let everything else pass. how would my iptables command be set up to block all traffic from going out in eth1 besides my.website.edu. and allowing all traffic but my.website.edu on eth0? thanks for the help
 
Old 12-04-2004, 03:15 PM   #2
mikeyt_333
Member
 
Registered: Jun 2001
Location: Up in the clouds
Distribution: Fedora et al.
Posts: 353

Rep: Reputation: 30
check this out:
http://www.linuxguruz.com/iptables/h...niptables.html

It's just the manpage for iptables. note the -i flag which sets the interface the rule is specific to. I don't quite understand the structure of your traffic blocking, can you maybe refrase it? Checkout the man page and just play around with what does and doesn't work.

HTH
Mike.
 
Old 12-04-2004, 03:31 PM   #3
fugzi
LQ Newbie
 
Registered: Aug 2003
Distribution: gentoo
Posts: 9

Original Poster
Rep: Reputation: 0
i have three nics in my router
eth0 - wan1 10.16.61.241
eth1 - wan2 172.16.62.3
eth2 - lan 192.168.1.1

i want all traffic to go out eth0 except traffic to my.website.edu
i only want traffic to my.website.edu to go out eth1

i am wondering how i would set up.

this is my current iptables rules based on a gentoo howto
Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     udp  --  anywhere             anywhere            udp dpt:bootps reject-with icmp-port-unreachable
REJECT     udp  --  anywhere             anywhere            udp dpt:domain reject-with icmp-port-unreachable
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
DROP       all  --  anywhere             192.168.1.0/24
ACCEPT     all  --  192.168.1.0/24       anywhere
ACCEPT     all  --  anywhere             192.168.1.0/24
ACCEPT     all  --  anywhere             192.168.1.0/24

Chain OUTPUT (policy ACCEPT)
 
  


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
iptables blocking traffic JJX Linux - Networking 4 11-07-2005 05:36 AM
Blocking MSN Messenger Traffic With Smoothwall canadiantechie Linux - Software 0 08-21-2004 03:03 PM
Kernel 2.4.26, slack 8.0: blocking outgoing traffic coindood Linux - Networking 3 06-03-2004 10:15 PM
Iptables blocking all traffic on other NIC spede Linux - Security 3 05-05-2004 05:37 PM
firewall traffic blocking help jaylee Linux - Security 8 06-30-2003 10:44 AM

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

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