LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-19-2011, 07:57 PM   #1
jeffschips
LQ Newbie
 
Registered: May 2011
Posts: 2

Rep: Reputation: Disabled
IP Aliasing and Multihoming confusion


I will shortly be the master of the universe: my own collocated server with a single nick and 5 usable IP addresses.

I know I can assign multi-ip addresses to a single nic interface (create virtual addresses), and I can read up on how to do that.

My question is, if I have 5 registered IP addresses and I allocate them to the one interface, will I be able to directly assign them to different software say one to apache, another to ftp, smtp server, etc. and will Linux Iptables be sufficient to act as a firewall between the outside world and those ports?

I'm expecting that I would be assigning not NAT'd sub-network addresses to those virtual interfaces but one each of the actual registered IP addresses.

Correct me if I'm wrong, please.

Thank you.
 
Old 05-21-2011, 07:07 AM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
While most services typically either listen to loopback only or listen on all interfaces/IPs by default, you assessment is accurate. You may configure a service such as apache, vsftpd, ... to bind to a specific IP if so desired. Also, iptables should work well given a little forethought in implementation. Many examples, scripts, and "builders" exist for getting you started with netfilter rules.
 
1 members found this post helpful.
Old 05-29-2011, 09:52 AM   #3
jeffschips
LQ Newbie
 
Registered: May 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you I will look into that.
 
Old 11-11-2011, 02:09 PM   #4
fitzy75
LQ Newbie
 
Registered: Aug 2005
Location: United Kingdom
Distribution: Mandrake 10.0, Mandriva 2005 LE, amaroK Live CD, Knoppix Live CD
Posts: 14

Rep: Reputation: 0
Hello, sorry to drag up an old thread. I am looking to do pretty much the same as this, I'm using CentOS 6 and I would like to have multiple IPs on a single NIC. My question differs slightly though.

I run Xampp (Apache etc...) on the standard port 80, and I would like to run another web server (related to the game Minecraft) on port 80 as well, if I assign multiple IPs to the NIC, can each server bind to a separate IP and still run on port 80? I guess the application would have to be able to listen on a certain IP which I know Apache can do so hopefully the other software will automatically pick the remaining one.
 
Old 11-12-2011, 08:00 AM   #5
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
configure /etc/httpd/conf/httpd.conf's Listen directive from 80 to yo.ur.i.p:80.

commented above the directive is explanation and example of this
Code:
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
 
Old 11-18-2011, 04:57 AM   #6
fitzy75
LQ Newbie
 
Registered: Aug 2005
Location: United Kingdom
Distribution: Mandrake 10.0, Mandriva 2005 LE, amaroK Live CD, Knoppix Live CD
Posts: 14

Rep: Reputation: 0
Thanks rayfordj,

Will give it a go as soon as I have chance, thanks for your reply.

Cheers
 
  


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
Multihoming dwezel Linux - Newbie 2 06-25-2008 07:39 AM
Load Balancing/multihoming/bonding/3 Nics Neo321/genius321 Linux - Networking 5 02-14-2007 03:53 AM
Aliasing makeshifttheory Ubuntu 2 06-12-2006 06:43 PM
enable multihoming on linux enterprise helmsley Linux - Networking 2 02-12-2006 08:05 PM
writing multihoming daemon without bind blackzone Linux - Networking 0 08-26-2004 09:40 PM

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

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