Index: fedkit/Makefile
===================================================================
--- fedkit/Makefile	(revision 8c9933ccc4ce21a447c3d08d4a8c703ea80fd9b3)
+++ fedkit/Makefile	(revision 47023224363064bc2d7ef48bdab57738428724e9)
@@ -1,4 +1,5 @@
 BINARIES=federate.sh smbmount.FreeBSD.pl smbmount.Linux.pl \
-	 make_hosts fed-tun.pl fed_evrepeater rc.fedaccounts
+	 make_hosts fed-tun.pl fed_evrepeater rc.fedaccounts \
+	 config_from_tunnelip.pl
 
 fedkit.tgz:	${BINARIES} ${PATCHES}
Index: fedkit/fed-tun.pl
===================================================================
--- fedkit/fed-tun.pl	(revision 8c9933ccc4ce21a447c3d08d4a8c703ea80fd9b3)
+++ fedkit/fed-tun.pl	(revision 47023224363064bc2d7ef48bdab57738428724e9)
@@ -76,5 +76,4 @@
 my $remote_script_dir;		# location of the other sides fed-tun.pl
 my $event_repeater;		# The pathname of the event repeater
-my $remote_config_file;		# Config file for the other side
 
 if ($#ARGV != 0 && !getopts('df:rn', \%opts)) {
@@ -135,18 +134,17 @@
     $remote_script_dir = $opts{'remotescriptdir'} || ".";
     $event_repeater = $opts{'eventrepeater'};
-    $remote_config_file = $opts{'remoteconfigfile'};
-    $remote_config_file = "-f $remote_config_file" if $remote_config_file;
+    my $listen_on = $opts{'sshlisten'};
 
     if (defined($opts{'fsname'})) {
-	push(@ssh_port_fwds,"-R :$SMBFS_PORT:$opts{'fsname'}:$SMBFS_PORT");
+	push(@ssh_port_fwds,"-R $listen_on:$SMBFS_PORT:$opts{'fsname'}:$SMBFS_PORT");
     }
 
     if (defined($opts{'bossname'})) {
-	push(@ssh_port_fwds, "-R :$TMCD_PORT:$opts{'bossname'}:$TMCD_PORT");
+	push(@ssh_port_fwds, "-R $listen_on:$TMCD_PORT:$opts{'bossname'}:$TMCD_PORT");
     }
 
     if (defined($opts{'eventservername'})) {
 	push(@ssh_port_fwds,"-R ". 
-	    ":$remote_pubsub_port:$opts{'eventservername'}:$PUBSUB_PORT");
+	    "$listen_on:$remote_pubsub_port:$opts{'eventservername'}:$PUBSUB_PORT");
     }
     if (defined($opts{'remoteeventservername'})) {
@@ -157,5 +155,5 @@
     # Forward connections to seer from remote TBs to control in this TB
     if (defined($opts{'seercontrol'})) {
-	push(@ssh_port_fwds,"-R :$SEER_PORT:$opts{seercontrol}:$SEER_PORT");
+	push(@ssh_port_fwds,"-R $listen_on:$SEER_PORT:$opts{seercontrol}:$SEER_PORT");
     }
 
@@ -241,5 +239,5 @@
     if ($type eq "control") {
 	foreach my $fwd (@ssh_port_fwds) {
-	    system("$SSH -N $fwd -Nno \"StrictHostKeyChecking no\" ". 
+	    system("$SSH -N $fwd -o \"StrictHostKeyChecking no\" ". 
 		"$opts{'peer'} &"); #or die "Failed to run ssh";
 	}
@@ -279,5 +277,5 @@
 	    "-o \"StrictHostKeyChecking no\" " . 
 	    "$opts{'peer'}  \"$remote_script_dir/fed-tun.pl " . 
-	    "$remote_config_file -r $addr $count\" & |";
+	    "-r $addr $count\" & |";
 
 	print "$cmd\n" if $debug;
@@ -415,7 +413,4 @@
     close(TMCD);
 
-    die "Unable to determine tunnel node configuration information"
-	if (!defined($tunnel_router) || !$tunnel_router);
-
     print "tunnel options:  ip=$tunnel_ip mask=$tunnel_mask mac=$tunnel_mac router=$tunnel_router\n" if ($debug);
 
@@ -433,20 +428,23 @@
     warn "configuration of tunnel interface failed" if ($?);
 
-    # Sometimes the insertion of DNS names lags a bit.  Retry this
-    # configuration a few times to let DNS catch up.  Might want to really
-    # check the DNS name before we try this...
-    my $config_succeeded = 0;
-    my $tries = 0;
-    my $max_retries = 300;
-
-    do {
-	system("route add $opts{'peer'} $tunnel_router");
-	if ( $? ) {
-	    warn "configuration routes via tunnel interface failed";
-	    $tries++;
-	    sleep(10);
-	}
-	else { $config_succeeded = 1; }
-    } until ( $config_succeeded || $tries > $max_retries );
+    if ($tunnel_router) {
+
+	# Sometimes the insertion of DNS names lags a bit.  Retry this
+	# configuration a few times to let DNS catch up.  Might want to really
+	# check the DNS name before we try this...
+	my $config_succeeded = 0;
+	my $tries = 0;
+	my $max_retries = 300;
+
+	do {
+	    system("route add $opts{'peer'} $tunnel_router");
+	    if ( $? ) {
+		warn "configuration routes via tunnel interface failed";
+		$tries++;
+		sleep(10);
+	    }
+	    else { $config_succeeded = 1; }
+	} until ( $config_succeeded || $tries > $max_retries );
+    }
 
     print "setup_tunnel_cfg done\n" if ($debug);
