LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-09-2007, 03:40 AM   #1
tunasashimi
Member
 
Registered: Jun 2005
Posts: 82

Rep: Reputation: 15
Lightbulb Iptables redirect AFTER INPUT/FORWARD chain processing


Hi All

I have a webserver listening on port 79, and showing the splash page, no matter what the request. When I put this in my nat table:

iptables -t nat -D PREROUTING -i eth0 -p tcp -j REDIRECT --to-port 79

I get the desired effect. Only problem is that I don't know till much later for which hosts I need this.

I have a fairly complex firewall that processes *a lot* of rules in it's INPUT and FORWARD chains. What I need to do, is to redirect all the packets that INPUT and FORWARD would have dropped, to that port, for the permanent splash page.

My questions:

1) Is there a way?

2) Should I maybe tag/mangle the packets that would have been dropped and then redirect at POSTROUTING? (Very tedious)

3) Can I redirect directly from INPUT/FORWARD?

4) Can I send the packet back to PREROUTING from INPUT/FORWARD?

Would much appreciate any info you have!
Thanks
 
  


Reply

Tags
firewall, forward, input, iptables, redirect



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
forward, input & output chains on iptables kurrupt Linux - Software 4 11-09-2011 04:29 AM
Forward email to script for processing? aaronvegh Programming 10 01-14-2011 11:34 AM
iptables -- How do I enable the input chain? trewsfan Linux - Networking 3 08-25-2006 04:54 AM
forwarded traffic is caught by input chain kc8tbe Linux - Security 5 04-14-2004 02:14 PM

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

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