version 1.7, 1999/12/14 19:59:39 |
version 1.8, 2000/01/10 08:32:03 |
|
|
GW_PEER=192.168.1.2 |
GW_PEER=192.168.1.2 |
|
|
# Local and remote networks, numbered, syntax <network>/<mask> |
# Local and remote networks, numbered, syntax <network>/<mask> |
LOCAL_NET_0=192.168.254.0/0xffffff00 |
LOCAL_NET_0=192.168.254.0/255.255.255.0 |
LOCAL_NET_1=192.168.253.0/0xffffff00 |
LOCAL_NET_1=192.168.253.0/255.255.255.0 |
REMOTE_NET_0=192.168.1.0/0xffffff00 |
REMOTE_NET_0=192.168.1.0/255.255.255.0 |
REMOTE_NET_1=192.168.2.0/0xffffff00 |
REMOTE_NET_1=192.168.2.0/255.255.255.0 |
|
|
# Crypto options and keys, note that key/iv lengths need to correspond |
# Crypto options and keys, note that key/iv lengths need to correspond |
# to the selected encryption and authentication algorithms. |
# to the selected encryption and authentication algorithms. |
|
|
|
|
# Gateway to gateway |
# Gateway to gateway |
$DEBUG $ipsecadm flow -proto esp -dst $GW_PEER -spi $SPI_OUT \ |
$DEBUG $ipsecadm flow -proto esp -dst $GW_PEER -spi $SPI_OUT \ |
-addr $GW_LOCAL 0xffffffff $GW_PEER 0xffffffff |
-addr $GW_LOCAL 255.255.255.255 $GW_PEER 255.255.255.255 |
|
|
# Flows from each local, to each remote, subnet |
# Flows from each local, to each remote, subnet |
mycount=0 |
mycount=0 |
|
|
if [ "${remote_net}" != "0x0" ]; then |
if [ "${remote_net}" != "0x0" ]; then |
$DEBUG $ipsecadm flow \ |
$DEBUG $ipsecadm flow \ |
-proto esp -dst $GW_PEER -spi $SPI_OUT \ |
-proto esp -dst $GW_PEER -spi $SPI_OUT \ |
-addr $GW_LOCAL 0xffffffff $remote_net $remote_mask |
-addr $GW_LOCAL 255.255.255.255 $remote_net $remote_mask |
peercount=$(($peercount + 1)) |
peercount=$(($peercount + 1)) |
else |
else |
break; |
break; |
|
|
if [ "${local_net}" != "0x0" ]; then |
if [ "${local_net}" != "0x0" ]; then |
$DEBUG $ipsecadm flow \ |
$DEBUG $ipsecadm flow \ |
-proto esp -dst $GW_PEER -spi $SPI_OUT \ |
-proto esp -dst $GW_PEER -spi $SPI_OUT \ |
-addr $local_net $local_mask $GW_PEER 0xffffffff |
-addr $local_net $local_mask $GW_PEER 255.255.255.255 |
mycount=$(($mycount + 1)) |
mycount=$(($mycount + 1)) |
else |
else |
break; |
break; |