-d $ctdb_natgw_public_ip_host -j REJECT 2>/dev/null
ip addr add $CTDB_NATGW_PUBLIC_IP dev $CTDB_NATGW_PUBLIC_IFACE
- ip route add 0.0.0.0/0 metric 10 via $CTDB_NATGW_DEFAULT_GATEWAY >/dev/null 2>/dev/null
+ if [ -n "$CTDB_NATGW_DEFAULT_GATEWAY" ] ; then
+ ip route add 0.0.0.0/0 metric 10 via $CTDB_NATGW_DEFAULT_GATEWAY
+ fi
}
natgw_set_slave ()
<varname>CTDB_NATGW_PUBLIC_IP</varname> on the configured public
interfaces <varname>CTDB_NATGW_PUBLIC_IFACE</varname> and acts as
a router, masquerading outgoing connections from slave nodes
- via this IP address. It also establishes a fallback default
- route to the configured default gateway
- <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> with a metric of 10.
- A metric 10 route is used so it can co-exist with other
- default routes that may be available.
+ via this IP address. If
+ <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is set then it
+ also establishes a fallback default route to the configured
+ this gateway with a metric of 10. A metric 10 route is used
+ so it can co-exist with other default routes that may be
+ available.
</para>
<para>
<listitem>
<para>
IPADDR is an alternate network gateway to use on the NAT
- gateway master node. A fallback default route is added
- via this network gateway.
+ gateway master node. If set, a fallback default route
+ is added via this network gateway.
</para>
<para>
- No default.
+ No default. Setting this variable is optional - if not
+ set that no route is created on the NAT gateway master
+ node.
</para>
</listitem>
</varlistentry>