diff --git a/tracer/forward.c b/tracer/forward.c
index 77ee156751d2dfe5fc3403700a6d54e792928908..9e0df61fbfc12ce3b6575bdd326fadfb2893fbd4 100644
--- a/tracer/forward.c
+++ b/tracer/forward.c
@@ -1,10 +1,42 @@
 #include "defs.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <netinet/ip.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+
+typedef struct {
+  int s;
+} forward_data;
 
 void *forwarder(char *ip, int port)
 {
-  return 0;
+  forward_data *f;
+  struct sockaddr_in a;
+
+  f = malloc(sizeof(*f)); if (f == NULL) abort();
+
+  f->s = socket(AF_INET, SOCK_STREAM, 0);
+  if (f->s == -1) { perror("socket"); exit(1); }
+
+  a.sin_family = AF_INET;
+  a.sin_port = htons(port);
+  a.sin_addr.s_addr = inet_addr(ip);
+
+  if (connect(f->s, (struct sockaddr *)&a, sizeof(a)) == -1)
+    { perror("connect"); exit(1); }
+
+  return f;
 }
 
-void forward(void *_fowarder, char *buf, int size)
+void forward(void *_forwarder, char *buf, int size)
 {
+  forward_data *f = _forwarder;
+
+  while (size) {
+    int l = write(f->s, buf, size);
+    if (l <= 0) { printf("forward error\n"); exit(1); }
+    size -= l;
+    buf += l;
+  }
 }