0

I have got a small network consisting of a terminal. Each one has a PPPoE link to an Ubuntu PPPoE server. This network is working fine, and each terminal can ping every other and the internet - all via the PPPoE server.

I have another network, which I want to be able to ping the terminals from. This network is not in the same building, and I need a tunnel into it. I would like to use Hamachi for this, as I am fairly used to setting it up etc, and the Ubuntu PPPoE server has the Hamachi client installed and setup.

I just need any PCs in the Hamachi network to be able to ping the PPPoE client terminals, but adding a route to the PPPoE subnet through the Hamachi link does yield any results :(

    PC1 o====o Hamachi o====o PPPoE Server  --------> terminal
5.121.250.1                    5.121.250.2
                               172.16.2.1/24           172.16.2.50

PC1 route:

route add 172.16.2.0 mask 255.255.255.0 5.121.250.2

Debug

On the PPPoE server, TCPDUMP shows pings coming in from PC1 if they are directed to the Hamachi IP address, but to anything else they dont show.

justacodemonkey
  • 153
  • 1
  • 7
  • 1
    Why use Hamachi? Set up a VPN tunnel with OpenVPN. Don't depend on third-party if you can do it yourself. Hamachi even uses IP-addresses they don't own. – Bart De Vos Jan 24 '12 at 13:06

2 Answers2

1

So I got this working in the end - I had to setup the Hamachi network in "Gateway" mode making the Ubuntu box the gateway.

Once I had done this then I added the remote HAamchi client into the same Hamachi network as a client and Hamachi did the rest, configuring the routing on the remote client machine. Quite clever.

I think @Bart de Vos had the best idea though - OpenVPN would make a more controllable setup, but Hamachi's client it generally a bit nicer and it is easy for me to add more clients in the future.

Rich

justacodemonkey
  • 153
  • 1
  • 7
0

Not sure how Hamachi reacts to this sort of thing, but, generally, you'll need to do the following on the Ubuntu box:

  1. Turn on IP forwarding. Uncomment (or add) the line net.ipv4.ip_forward=1 in /etc/sysctl.conf, then do sudo sysctl -p
  2. Make sure your firewall is permitting forwarding. sudo iptables -L -n should show that you're allowing the 5.x.x.x traffic through to 172.16.x.x, either specifically or just in general.

The terminal at 172.16.2.50 will also need to know how to route back to the Hamachi client. If the Ubuntu PPPoE box is also the gateway for that LAN, there should be no problem. If not, then the terminal will need to have routing configuration back to PC1 with the Ubuntu box as the gateway.

cjc
  • 24,533
  • 2
  • 49
  • 69