LinuxQuestions.org
Help answer threads with 0 replies.
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 06-20-2009, 07:44 AM   #1
please
Member
 
Registered: Apr 2007
Posts: 195

Rep: Reputation: 30
redirect


Dear All

I was redirect following command
it was OK
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080

I not want to redirect all 80 except one http site.

How can I do put again?

Thanks
 
Old 06-20-2009, 08:18 AM   #2
Trumpen
LQ Newbie
 
Registered: Dec 2008
Location: Italy
Distribution: Debian & Ubuntu
Posts: 11

Rep: Reputation: 0
Add a rule which accepts packets heading to $server:80, just before the one you are already using:
Code:
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -d $server -j ACCEPT
 
Old 06-20-2009, 08:40 AM   #3
please
Member
 
Registered: Apr 2007
Posts: 195

Original Poster
Rep: Reputation: 30
$server what is website address?
 
Old 06-20-2009, 09:20 AM   #4
Trumpen
LQ Newbie
 
Registered: Dec 2008
Location: Italy
Distribution: Debian & Ubuntu
Posts: 11

Rep: Reputation: 0
Yes, it's the ip address of the server you want to visit without redirection.
 
Old 06-21-2009, 01:05 AM   #5
please
Member
 
Registered: Apr 2007
Posts: 195

Original Poster
Rep: Reputation: 30
OK

I will be test ..

I have 3 NICs
2 for WAN
1 for LAN

eth0 = LAN
eth1 = ISP 1
eth2 = ISP 2

SO I want to split 80 and 443,
When 80 request come want to use eth1
when 443 come want to use eth2
but I want to use https://mail.google.com with eth1,not want this gmail for eth2

Can OK?

Thanks

Please
 
Old 06-22-2009, 03:21 AM   #6
please
Member
 
Registered: Apr 2007
Posts: 195

Original Poster
Rep: Reputation: 30
Hi

Anybody can`t?
 
  


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
Exim4 Redirect Luke_C Linux - Server 1 08-11-2006 07:00 PM
redirect matt1982 Programming 2 12-20-2004 09:53 AM
Redirect wonderland Linux - Newbie 3 05-24-2004 11:50 PM
redirect spank Linux - Newbie 2 03-01-2004 03:38 PM
Redirect sheek Programming 1 07-25-2003 12:53 PM

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

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