mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 14:20:40 +01:00
Add sample 'findgw' scripts to the Multi-ISP doc
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
4edd6026f0
commit
cfc6b7405f
@ -119,7 +119,7 @@
|
||||
ISP.</para>
|
||||
</footnote> as in the following diagram.</para>
|
||||
|
||||
<graphic align="center" fileref="images/TwoISPs.png" valign="middle" />
|
||||
<graphic align="center" fileref="images/TwoISPs.png" valign="middle"/>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
@ -342,6 +342,33 @@
|
||||
may try to use those stale files to determine the gateway
|
||||
address.</para>
|
||||
|
||||
<para>If Shorewall is unable to detect the gateway, it is likely
|
||||
because you are using a DHCP client that Shorewall doesn't
|
||||
natively support. You can work around that issue by using the
|
||||
<emphasis role="bold">findgw</emphasis> <ulink
|
||||
url="shorewall_extension_scripts.htm">extension
|
||||
script.</ulink></para>
|
||||
|
||||
<para>For example, these examples from Mika Ilmaranta, work with
|
||||
RHEL7-based systems with nmcli:</para>
|
||||
|
||||
<programlisting>nmcli --terse --fields IP6.GATEWAY device show ${1} | cut -f2- -d':' # IPv6
|
||||
|
||||
nmcli --terse --fields IP4.GATEWAY device show ${1} | cut -f2- -d':' #IPv4
|
||||
</programlisting>
|
||||
|
||||
<para>This one from PGNd works on OpenSuSE running wicked:</para>
|
||||
|
||||
<programlisting>svc_status=$( systemctl is-active wickedd-dhcp4.service )
|
||||
|
||||
if [ $svc_status == 'active' ]; then
|
||||
data="/var/lib/wicked/lease-${1}-dhcp-ipv4.xml"
|
||||
if [ -f $data ]; then
|
||||
gateway=$( xml_grep 'gateway' $data --text_only )
|
||||
echo $gateway
|
||||
fi
|
||||
fi</programlisting>
|
||||
|
||||
<para>The GATEWAY may be omitted (enter '-') for point-to-point
|
||||
links.</para>
|
||||
</listitem>
|
||||
@ -2480,7 +2507,7 @@ exit 0
|
||||
on ursa that I will describe here</emphasis>.</para>
|
||||
|
||||
<para>Below is a diagram of our network:<graphic align="center"
|
||||
fileref="images/Network2008a.png" /></para>
|
||||
fileref="images/Network2008a.png"/></para>
|
||||
|
||||
<para>The local wired network in my office is connected to both gateways
|
||||
and uses the private (RFC 1918) network 172.20.1.0/24. The Comcast
|
||||
@ -2651,7 +2678,7 @@ wlan0 192.168.0.0/24</programlisting><note>
|
||||
|
||||
<para>The network is pictured in the following diagram:</para>
|
||||
|
||||
<graphic fileref="images/Network2013.png" />
|
||||
<graphic fileref="images/Network2013.png"/>
|
||||
|
||||
<section>
|
||||
<title>IPv4 Configuration</title>
|
||||
|
Loading…
Reference in New Issue
Block a user