LinuxQuestions.org
Help answer threads with 0 replies.
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 08-25-2010, 02:44 PM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
Real quick iptables question (I mean real quick)


Don't have a spare box to test, but our perimeter firewall is running U9.04 with iptables. We are moving a website to another network, and there are plenty of how to's but all are doing it on the box itself, not one step above. Meaning, the box the website is on is hosting other sites so can't say take all port 80 and do this, so I want to at the firewall level say move destination ip to here. The examples all show;

# iptables -t nat -D PREROUTING -p tcp –dport 80 -j DNAT –to-destination newip
# iptables -t nat -D POSTROUTING -p tcp -d newip –dport 80 -j MASQUERADE

Now I want to say the above, but since he has 60+ IP's going through him, can you throw a destination IP x.x.x.x or something? Basically I want to at the firewall level say, oh this is coming in for 1.1.1.1:80, masq that to 2.2.2.2:80

Thanks, w/o a box to test on I will do this live and hate doing stuff like this live on a box 60 miles away!
 
Old 08-25-2010, 09:41 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,127
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
you should only need the prerouting rule unless the box at newip won't know how to send back the traffic
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: REAL Software Ships REALbasic 2006 Release 3 for Linux; Gives Visual Basic Development Teams a Quick Path to Linux LXer Syndicated Linux News 0 07-07-2006 07:03 AM
quick iptables question peok Linux - Networking 6 11-11-2003 03:34 PM
3 years getting here (real quick i am) jolly1701 LinuxQuestions.org Member Intro 1 11-03-2003 09:36 AM
dual display question - real real newbie !! Jay_Dee007 Linux - Newbie 1 09-29-2003 09:33 AM

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

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