LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-21-2004, 12:21 PM   #1
x86br
Newbie
 
Registered: Jan 2003
Posts: 26

Rep: Reputation: 15
Iptables Redirect Question


I want exclude two networks ranges from a iptables redirect!

iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 80 -d ! network1,network2 -j REDIRECT --to-port 8080

network1,network2 dont works!!!!


How can I do it ?



TIA MATES!!!
 
Old 09-22-2004, 08:48 AM   #2
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Try using 2 rules, something like this:

iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 80 -d network1,network2 -j ACCEPT
iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 80 -j REDIRECT --to-port 8080
 
  


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 redirect patvrs Linux - Networking 15 08-02-2005 08:31 AM
iptables redirect _ben_deb_ Linux - Networking 7 11-13-2004 05:06 AM
IPTABLES redirect question yuzuohong Linux - Networking 3 01-01-2003 09:30 PM
IPTABLES redirect question yuzuohong Linux - General 2 01-01-2003 10:47 AM
iptables redirect bhartnett Linux - Networking 1 09-26-2001 09:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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