How to bind multiple IPs to my network card?

Posted on 2003-03-19
Medium Priority
Last Modified: 2010-08-05
I have a firewall system with a public IP.  I have a bunch of ip address which I want to point to the MAC address on my firewall ethernet card so I can determine which ip was requested and forward the request to the appropraite resource in my private network.

Any ideas?
Question by:NeilPeel
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 19

Accepted Solution

Gabriel Orozco earned 1000 total points
ID: 8171454
very easy:

ifconfig eth0:0 netmask up
( should be changed with the real ip, put the correct netmask please, and add from eth0:0 up to eth0:256 or more ;)

so, if you ip addresses are and, all with netmask, then
if your external interfase is eth1, in /etc/rc.d/rc.local
please add at the top:

ifconfig eth1:0 netmask up
ifconfig eth1:1 netmask up

so you will have your normal ip address in eth1, plus another two ip addresses bounded to the same interfase.

after that, you need to setup iptables to redirect:
a) port by port (more secure, more work)
iptables -I PREROUTING -t nat -i eth1 -p tcp -d --dport 25 -j DNAT --to-destination

b) all the ports:
iptables -I PREROUTING -t nat -i eth1 -p tcp -d -j DNAT --to

hope this helps :)

Expert Comment

ID: 9077627
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month10 days, 2 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question