Index: npl/syn3/webint/src/vpn/edittunnel.php
===================================================================
--- npl/syn3/webint/src/vpn/edittunnel.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/edittunnel.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -99,4 +99,15 @@
 	elseif ($new_leftsourceip && !ValidIp($new_leftsourceip))
 		$errors[new_leftsourceip]=_EnterValidIp();
+	else {
+		$tunnels=vpn_ReadTunnels();
+		foreach ($tunnels as $name=>$data)
+		{
+			if (($name != $new_name) && ($data[leftid]==$new_leftid) && ($data[right]==$new_right))
+			{
+				$errors[new_leftid]=_TunnelAlreadyExistsBetweenHosts($name);
+				break;
+			}
+		}
+	}
 
 
Index: npl/syn3/webint/src/vpn/lang_de.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_de.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_de.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -240,4 +240,8 @@
 );}
 
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { return (
+	"Tunnel $a already exists between these IP adresses."
+);}
+
 function _TunnelDownError($a='',$b='') { return (
 	"Fehler beim Deaktivieren des Tunnels $a: $b"
Index: npl/syn3/webint/src/vpn/lang_deD.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_deD.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_deD.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -240,4 +240,8 @@
 );}
 
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { LangDebug("Tunnel $a already exists between these IP adresses.", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?src_lang=en&add_langID=de&add_labelID=_TunnelAlreadyExistsBetweenHosts");return (
+	"Tunnel $a already exists between these IP adresses."
+);}
+
 function _TunnelDownError($a='',$b='') { LangDebug("Fehler beim Deaktivieren des Tunnels $a: $b", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=4301");return (
 	"Fehler beim Deaktivieren des Tunnels $a: $b"
Index: npl/syn3/webint/src/vpn/lang_en.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_en.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_en.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -240,4 +240,8 @@
 );}
 
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { return (
+	"Tunnel $a already exists between these IP adresses."
+);}
+
 function _TunnelDownError($a='',$b='') { return (
 	"Error while disabling tunnel $a: $b"
Index: npl/syn3/webint/src/vpn/lang_enD.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_enD.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_enD.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -240,4 +240,8 @@
 );}
 
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { LangDebug("Tunnel $a already exists between these IP adresses.", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=8326");return (
+	"Tunnel $a already exists between these IP adresses."
+);}
+
 function _TunnelDownError($a='',$b='') { LangDebug("Error while disabling tunnel $a: $b", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=1387");return (
 	"Error while disabling tunnel $a: $b"
Index: npl/syn3/webint/src/vpn/lang_nl.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_nl.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_nl.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -240,4 +240,8 @@
 );}
 
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { return (
+	"Tunnel $a bestaat al tussen deze twee IP adressen."
+);}
+
 function _TunnelDownError($a='',$b='') { return (
 	"Probleem tijdens het uitschakellen van tunnel $a: $b"
Index: npl/syn3/webint/src/vpn/lang_nlD.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_nlD.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_nlD.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -240,4 +240,8 @@
 );}
 
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { LangDebug("Tunnel $a bestaat al tussen deze twee IP adressen.", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=8327");return (
+	"Tunnel $a bestaat al tussen deze twee IP adressen."
+);}
+
 function _TunnelDownError($a='',$b='') { LangDebug("Probleem tijdens het uitschakellen van tunnel $a: $b", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=423");return (
 	"Probleem tijdens het uitschakellen van tunnel $a: $b"
Index: npl/syn3/webint/src/vpn/lang_pl.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_pl.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_pl.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -240,4 +240,8 @@
 );}
 
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { return (
+	"Tunnel $a already exists between these IP adresses."
+);}
+
 function _TunnelDownError($a='',$b='') { return (
 	"B&#322;ad podczas wy&#322;&#261;czania tunelu $a: $b"
Index: npl/syn3/webint/src/vpn/lang_plD.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_plD.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_plD.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -238,4 +238,8 @@
 function _ThisSide($a='',$b='') { LangDebug("Ustawienia \'tutaj\'", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=4726");return (
 	"Ustawienia 'tutaj'"
+);}
+
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { LangDebug("Tunnel $a already exists between these IP adresses.", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?src_lang=en&add_langID=pl&add_labelID=_TunnelAlreadyExistsBetweenHosts");return (
+	"Tunnel $a already exists between these IP adresses."
 );}
 
Index: npl/syn3/webint/src/vpn/lang_pt.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_pt.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_pt.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -240,4 +240,8 @@
 );}
 
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { return (
+	"Tunnel $a already exists between these IP adresses."
+);}
+
 function _TunnelDownError($a='',$b='') { return (
 	"Error while disabling tunnel $a: $b"
Index: npl/syn3/webint/src/vpn/lang_ptD.php
===================================================================
--- npl/syn3/webint/src/vpn/lang_ptD.php	(revision 968483260143de8bf173f7e90d371e887917f6c4)
+++ npl/syn3/webint/src/vpn/lang_ptD.php	(revision e248cf206de78584fb5cd2702847596c07312488)
@@ -240,4 +240,8 @@
 );}
 
+function _TunnelAlreadyExistsBetweenHosts($a="",$b="",$c="",$d="") { LangDebug("Tunnel $a already exists between these IP adresses.", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?src_lang=en&add_langID=pt&add_labelID=_TunnelAlreadyExistsBetweenHosts");return (
+	"Tunnel $a already exists between these IP adresses."
+);}
+
 function _TunnelDownError($a='',$b='') { LangDebug("Error while disabling tunnel $a: $b", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?src_lang=en&add_langID=pt&add_labelID=_TunnelDownError");return (
 	"Error while disabling tunnel $a: $b"
