diff --git a/api/controllers/Nat.php b/api/controllers/Nat.php
index a1ce284d5c594ab1a8415a3795fc1677ae9782f9..d220c93c8cb7e69a8941757a00f0416f10aa1a80 100644
--- a/api/controllers/Nat.php
+++ b/api/controllers/Nat.php
@@ -227,6 +227,11 @@ class Nat_controller extends Common_api_functions {
         $values = $this->validate_keys ();
         # validate input format
         $this->validate_nat_edit();
+        foreach (array("src","dst") as $k) {
+            if ( array_key_exists($k, $values) ) {
+                $values[$k] = json_encode($values[$k]);
+            }
+        }
 
         if (!$this->Admin->object_modify ("nat", "edit", "id", $values)) {
             $this->Response->throw_exception(500, "NAT modification failed");