LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-22-2009, 10:50 PM   #1
noir911
Member
 
Registered: Apr 2004
Location: Baltimore, MD
Posts: 681

Rep: Reputation: Disabled
routing over virtual interface


I have a virtual linux box sitting on a ESX server. I would like to setup a virtual interface on that box (eth0:0) and assign an IP address: 192.169.25.1 - that's the easy part.

The hard part: if anything comes to that IP address, I would like to redirect it to a particular subnet (basically, making it a router) - does anyone know how to achieve that?

Thanks.
 
Old 02-23-2009, 10:47 AM   #2
gergely89
Member
 
Registered: Feb 2009
Posts: 100

Rep: Reputation: 21
If the main purpose of that virtual linux box is to serve as a router, then rather install a router like Smoothwall, which is actually a dedicated Linux system with modest system requirements acting as a router. Have a look at http://www.smoothwall.org/ for more info on this.

The other solution would be to add some forwarding and masquerading commands to your firewall.
Something like this maybe
Quote:
iptables -t nat -A PREROUTING -p tcp -i eth0 -d Y.Y.Y.Y --dport 80 -j DNAT --to Z.Z.Z.Z:80
iptables -A FORWARD -p tcp -i eth0 -d Z.Z.Z.Z --dport 80 -j ACCEPT
There has been a thread on linuxquestions.org lately about port forwarding - browse or Google for it.

linux

Last edited by gergely89; 02-27-2009 at 10:50 PM.
 
  


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
Create routing between virtual interface in linux attojung Linux - Networking 2 03-13-2009 01:06 PM
virtual interface routing noir911 Linux - Server 11 10-22-2008 06:11 PM
Adding virtual interface for IP based virtual host pridefc Linux - General 6 03-16-2008 03:52 PM
Routing on a single Interface bernard7 Linux - Networking 2 05-01-2006 04:06 PM
interface ok, dhcp ok, routing gw not ok- help sokar Linux - Wireless Networking 4 02-04-2004 10:39 AM


All times are GMT -5. The time now is 02:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration