Forums

Resolved
0 votes
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?
Monday, June 27 2016, 09:58 PM
Share this post:
Responses (6)
  • Accepted Answer

    Friday, July 01 2016, 12:04 AM - #Permalink
    Resolved
    0 votes
    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
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, June 29 2016, 11:26 AM - #Permalink
    Resolved
    0 votes
    And this doc gives examples of listening on different IP's.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, June 29 2016, 09:07 AM - #Permalink
    Resolved
    0 votes
    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
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 28 2016, 06:31 PM - #Permalink
    Resolved
    0 votes
    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/.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 28 2016, 06:13 PM - #Permalink
    Resolved
    0 votes
    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?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 28 2016, 07:23 AM - #Permalink
    Resolved
    0 votes
    If both IP's are to be used by ClearOS you can create a virtual interface. If the one IP is going to be forwarded to a machine behind ClearOS, use the 1-to-1 NAT module.
    The reply is currently minimized Show
Your Reply