I am setting up ClearOS7 Business to host some services like email and FTP. I have a NIC for the LAN and one for the connection to our ISP.
The complication is that we have multiple external IP addresses (they are all static). The IP settings function does not allow me to assign more than one IP address to an interface.
How can I assign 2+ static external IP addresses to a single interface?
The complication is that we have multiple external IP addresses (they are all static). The IP settings function does not allow me to assign more than one IP address to an interface.
How can I assign 2+ static external IP addresses to a single interface?
In IP Settings
Share this post:
Responses (6)
-
Accepted Answer
Thank you for your help. I tried making config changes to Apache, but to no avail. It still seems determined to take over every IP address on the machine.
Since this is an Apache issue, I continued it here:
https://www.clearos.com/clearfoundation/social/community/can-t-get-apache-to-limit-itself-to-certain-ip-addresses -
Accepted Answer
-
Accepted Answer
Hi
Can't you create Apache virtual hosts? Then you can have multiple domains on a single IP (on port 443 and 80)
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-6
<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot /var/www/example.com/public_html
ServerName www.example.com
ServerAlias example.com
ErrorLog /var/www/example.com/error.log
CustomLog /var/www/example.com/requests.log
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@anotherdomain.com
DocumentRoot /var/www/anotherdomain.com/public_html
ServerName www.anotherdomain.com
ServerAlias anotherdomain.com
ErrorLog /var/wwwanotherdomain.com/error.log
CustomLog /var/www/anotherdomain.com/requests.log
</VirtualHost>
I use a similar method to have a intranet site and a Wordpress Blog installation running on same system -
Accepted Answer
I was just replying to your other post. Roundcubemail is not an app as such. It just forms another part of your web server (for me it is mydomain.com/mail, mydomain.com/roundcube and mydomain.com/roundcubemail, all aliased). I've no idea how you restrict it to a single IP, but it is probably possible. You probably have to research what you can put in the configuration files in /etc/httpd/conf.d/. -
Accepted Answer
Thank you, Nick! I created Virtual Interfaces for the additional external IP addresses, and it appears to work.
A followup question: How can I restrict an application to a single IP/Virtual Interface? For example, let's say I want to install Roundcube to let users have webmail for the mail server on the machine. I want it to be accessible through a particular subdomain (webmail.mycompany.com) which points to an IP on this machine. But I already have an application that uses a web portal on this machine, and a different subdomain (timesheet.mycompany.com) points to a different IP. How do I make Application A available on Virtual Interface A and Roundcube available on Virtual Interface B, each on ports 80 and 443? If this isn't the right subforum to ask this in, where should I ask? -
Accepted Answer
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »