How to add a second IP

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
Justin Rock
Posts: 16
Joined: Fri Sep 12, 2014 9:57 pm

How to add a second IP

Post by Justin Rock »

I installed Zimbra on FC3 and had it all working beautifully.... then I added a second NIC to the machine (configured ifcfg, added hostname to hosts). Brought up the new nic (192.x.x.x subnet) and was able to connect via ssh. I attempted to connect to zimbra via https on the new ip and got server refused connection (assumed it was iptables). Thus I did the following:
zmcontrol shutdown

zmiptables -u

zmiptables -i

zmiptables -p (the new ip was listed)

zmcontrol startup
Now I get the following when doing the startup:
RESPONSE: (Zimbra::Mon::serviceInfo)

host

ip

name
From the zimbra.log I am getting:
Oct 6 14:44:28 zimbra zimbramon[2211]: 2211:info: Starting services

Oct 6 14:44:28 zimbra zimbramon[2211]: 2211:info: STARTING ldap

Oct 6 14:44:28 zimbra zimbramon[2211]: 2211:info: start service ldap

Oct 6 14:44:28 zimbra zimbramon[2211]: 2211:info: start app ldap

Oct 6 14:44:28 zimbra zimbramon[2211]: 2211:info: Starting child ldap: (20051006144428)

Oct 6 14:44:37 zimbra zimbramon[2211]: 2211:info: STARTING services

Oct 6 14:44:37 zimbra zimbramon[2211]: 2211:info: Doing startup

Oct 6 14:44:38 zimbra zimbramon[2546]: 2546:info: Zimbra Monitor startup: 2546

Oct 6 14:44:38 zimbra zimbramon[2546]: 2546:info: Process 894 not found - removing /opt/zimbra/zimbramon/FIFO/zm.pid

Oct 6 14:44:38 zimbra zimbramon[2566]: 2566:info: Status monitor startup

Oct 6 14:44:38 zimbra zimbramon[2567]: 2567:info: Creating soap server on port 7777
I can access the Web Login, but am unable to login in. I get the following error:
An unknown application error has occurred. Please correct any errors and retry. If the problem persists, please contact your System Aministrator. (AjxException.UNKNOWN_ERROR)
but I do not see anything in the zimbra.log file when I attempt to log in.
The admin console responds, but I do not see a login dialogue and thus am unable to login.
Any suggestions? What would be the correct way to set up zimbra to listen on two hosts?
Justin
marcmac
Elite member
Elite member
Posts: 2091
Joined: Fri Sep 12, 2014 9:53 pm

How to add a second IP

Post by marcmac »

When you ran iptables -p, were BOTH ips listed, or just one? If just one, you'll need to modify the script to forward for both IPs.
Justin Rock
Posts: 16
Joined: Fri Sep 12, 2014 9:57 pm

How to add a second IP

Post by Justin Rock »

Here is the output from zmiptables -p (yes, it has the 2 ips [3 technically including the loopback])
Port Mappings

-------------

25 --> 7075

993 --> 7993

443 --> 7443

995 --> 7995

389 --> 7389

80 --> 7070

110 --> 7110

143 --> 7143
IP Addresses

------------

127.0.0.1

10.0.0.33

192.168.1.33
marcmac
Elite member
Elite member
Posts: 2091
Joined: Fri Sep 12, 2014 9:53 pm

How to add a second IP

Post by marcmac »

Run (as root) iptables -t nat -L and post the output...
Justin Rock
Posts: 16
Joined: Fri Sep 12, 2014 9:57 pm

How to add a second IP

Post by Justin Rock »

# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)

target prot opt source destination
Chain POSTROUTING (policy ACCEPT)

target prot opt source destination
Chain OUTPUT (policy ACCEPT)

target prot opt source destination
marcmac
Elite member
Elite member
Posts: 2091
Joined: Fri Sep 12, 2014 9:53 pm

How to add a second IP

Post by marcmac »

Your post indicates that there's no port forwarding at all! Can you re-run zmiptables -i?
Justin Rock
Posts: 16
Joined: Fri Sep 12, 2014 9:57 pm

How to add a second IP

Post by Justin Rock »

$ zmiptables -u

failed to make symlink /etc/rc2.d/S08iptables: File exists

failed to make symlink /etc/rc3.d/S08iptables: File exists

failed to make symlink /etc/rc4.d/S08iptables: File exists

failed to make symlink /etc/rc5.d/S08iptables: File exists

iptables v1.2.11: can't initialize iptables table `nat': Permission denied (you must be root)

Perhaps iptables or your kernel needs to be upgraded.
zmiptables -i

failed to make symlink /etc/rc2.d/S08iptables: File exists

failed to make symlink /etc/rc3.d/S08iptables: File exists

failed to make symlink /etc/rc4.d/S08iptables: File exists

failed to make symlink /etc/rc5.d/S08iptables: File exists

iptables v1.2.11: can't initialize iptables table `nat': Permission denied (you must be root)


If I run zmiptables as root, then I get listings for the port forwarding when I do iptables -t nat -L.
marcmac
Elite member
Elite member
Posts: 2091
Joined: Fri Sep 12, 2014 9:53 pm

How to add a second IP

Post by marcmac »

You're supposed to run it as root - the zimbra user can't set up iptables.
What is the output from iptables -t nat -L after you get it set up?
Justin Rock
Posts: 16
Joined: Fri Sep 12, 2014 9:57 pm

How to add a second IP

Post by Justin Rock »

Once I ran it as root, it worked. Did I misunderstand the sticky from the re-ip posting? It reads:
"Consequently, after you re-ip the box, you need to run the following commands as the zimbra user:
zmcontrol shutdown

zmiptables -u

zmiptables -i

zmcontrol startup"
Should it read as the root user or I smoking something?
marcmac
Elite member
Elite member
Posts: 2091
Joined: Fri Sep 12, 2014 9:53 pm

How to add a second IP

Post by marcmac »

No, it should read "as root" for the two zmiptables options. The stop and start still run as zimbra.
Post Reply