# udp port forwarding problem (Hamachi)

## rowdy

I've trouble setting up Hamachi in my network.

The situation

```
WAN  ->  (eth0)-Gentoo Router-(eth1)  ->  LAN -> (eth0)-Gentoo Box with Hamachi
```

Starting Hamachi joining a network etc all works like a charm. However when I look from my Hamachi installation (Windows) at my work, I see a yellow circle next to my Hamachi box. This means that there is no direct connection. This could be solved by forwarding a udp port in my router and configure Hamachi to use that port.

So, on my Router I did this:

```
#  iptables -t nat -A PREROUTING -p udp --dport 5000 -i eth0 -j DNAT --to 192.168.0.2

# /etc/init.d/iptables save

# /etc/init.d/iptables restart
```

And on my Hamachi box I did 

```
# echo "UdpPort 5000" >> ~/.hamachi/config

# hamachi logout

# hamachi stop

# hamachi start

# hamachi login

# hamachi go-online my_network
```

But it still won't work; the yellow circle still appears. I can ping other users, but they can't ping me...

I've tried to start Hamachi using the -c option, but it says that hamachi is not running. :S

```
# hamachi -c ~/.hamachi/config

Hamachi does not seem to be running. Have you run 'hamachi start' ?

# hamachi start

Starting Hamachi hamachi-lnx-0.9.9.9-20 .. ok

# hamachi -c ~/.hamachi/config login

Hamachi does not seem to be running. Have you run 'hamachi start' ?

# hamachi -c ~/.hamachi/config

Hamachi does not seem to be running. Have you run 'hamachi start' ?

# hamachi

Hamachi, a zero-config virtual private networking utility, ver 0.9.9.9-20

  version  : hamachi-lnx-0.9.9.9-20

  pid      : 21441

  status   : offline

  nickname : Rowdy.nl (Cube@Home)
```

Does anybody have a idea how to fix this? Ow, and my Hamachi box does not have iptables installed...

----------

## Hu

Is your gateway box receiving and passing the traffic?  Run tcpdump on the external interface to verify that the Hamachi system outside your network is sending traffic to your gateway.  Run tcpdump on the internal interface to verify that the traffic is being sent from your gateway to the system running Hamachi.

If you don't have tcpdump, emerge net-analyzer/tcpdump.  You may also want to emerge net-analyzer/wireshark, which provides a nice GUI for interpreting the data from tcpdump.

----------

## Bearbonez

Try running "hamachi-init" before "hamachi start"

and I'm assuming you have done SU ---->tuncfg

If "hamachi-init" does not work try 

forcing it to create the config  by using "hamachi-init ~/.hamachi -f" or "hamachi-init /etc/hamachi -f"

depends where your config files are stored

try something like "sudo locate hamachi" and that should show you

after "hamachi start"

run "hamachi login"

if thats successful run "hamachi join <network>

if you join the network Ok then "hamachi list"

then "hamachi get-nicks"

and "hamachi list" again

----------

