?
Solved

How to bind multiple IPs to my network card?

Posted on 2003-03-19
4
Medium Priority
?
284 Views
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?
0
Comment
Question by:NeilPeel
[X]
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
4 Comments
 
LVL 19

Accepted Solution

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

ifconfig eth0:0 200.200.200.200 netmask 255.255.255.240 up
(200.200.200.200 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 123.123.123.123 and 234.234.234.234, all with netmask 255.255.255.250, then
if your external interfase is eth1, in /etc/rc.d/rc.local
please add at the top:

ifconfig eth1:0 123.123.123.123 netmask 255.255.255.250 up
ifconfig eth1:1 234.234.234.234 netmask 255.255.255.250 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 123.123.123.123 --dport 25 -j DNAT --to-destination 192.168.0.132:25

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


hope this helps :)
0
 

Expert Comment

by:CleanupPing
ID: 9077627
NeilPeel:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

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