Community discussions

MikroTik App
 
Ennercy
just joined
Topic Author
Posts: 8
Joined: Sun Nov 29, 2020 5:13 pm

Hetzner Subnet on Mikrotik CHR

Sat Mar 13, 2021 10:17 pm

Hello,

i'm having a question regarding the usage of a assigned /29 subnet to be used partly with NAT and without (so to say that i can use for example one ip of the subnet directly on a VM and use the built in firewall feature and for other vms use the mikrotik firewall rules)

So far i have been using all the time the built in firewall on the CHR but as i'm in a migration process i want to use for some specific vms directly the ips without any NAT though i'm unsure how i need to do that?

I've been trying to setup one ip of the subnet directly on a VM with defined gateway the CHR (where the subnet is being routed on) but no success so far.

Does anyone have a hint on this?

Thanks!
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Hetzner Subnet on Mikrotik CHR

Sat Mar 13, 2021 11:05 pm

You will need to enable proxy arp on the internal facing interface
 
Ennercy
just joined
Topic Author
Posts: 8
Joined: Sun Nov 29, 2020 5:13 pm

Re: Hetzner Subnet on Mikrotik CHR

Sat Mar 13, 2021 11:07 pm

You will need to enable proxy arp on the internal facing interface
local proxy arp or proxy arp?

thanks!
 
sindy
Forum Guru
Forum Guru
Posts: 10206
Joined: Mon Dec 04, 2017 9:19 pm

Re: Hetzner Subnet on Mikrotik CHR

Sun Mar 14, 2021 11:20 am

I'm not familiar with the Hetzner Subnet, so is it an L2 tunnel with one of the /29 addresses acting as a gateway, or it just means that traffic for any of the /29 is delivered to you via an L3 tunnel?

If it is an L2 tunnel:
  • one possibility is to insert a bridge between the uplink interface and the one facing to the VMs on which the public IPs should be up. So the WAN configuration of the router would move from the uplink interface to the bridge, and the traffic between the VMs and the uplink gateway would be forwarded at L2.
  • another possibility is to keep routing the traffic between the uplink and the VMs; in that case, you need to create "point-to-point over Ethernet" tunnels, assign the IP addresses as /32 ones to the VM ends of these tunnels, and assign some arbitrary address outside that /29 to the ends of these tunnels at Mikrotik side, and set that Mikrotik address as the default gateway at the VMs. Routes to those /32 addresses will be dynamically added to Mikrotik's routing table, and you'll still be able to use the IP firewall on the Mikrotik to control the traffic. And in this latter case, you need to set arp=proxy-arp on the WAN interface if one of the /29 addresses is the gateway.
If it is an L3 tunnel, the second approach is possible, except that you don't need the proxy-arp. Or you may give away the first and last address of the /29, and use the /29 as a subnet on a LAN-side bridge to which the VMs will be connected.
 
User avatar
che
Member Candidate
Member Candidate
Posts: 111
Joined: Fri Oct 07, 2005 1:04 pm

Re: Hetzner Subnet on Mikrotik CHR

Sun Mar 14, 2021 12:04 pm

Hello Ennercy,

You need to "detach" certain IP addresses from your CHR and "attach" them to your specific VMs. You might need to remove configuration specific to IPs you are detaching on your CHR, depending on how you set this up.

In Hetzner cloud you should be able to "detach" and "attach" resources in menu "Networks" by selecing network you want to manipulate and then click "Subnets" tab. I am giving you an example in the screenshot below.

Image

In case you didn't assign network like this the places you are able to manipulate IPs are either "Servers/Networking", "Floating IPs" or "Networks/Routes" tab.

Ideally first you want to break the poblem down to either some or all of these:
a) your understanding of Hetzner cloud
b) your understanding of MikroTIk platform
c) your understanding of general networking

Who is online

Users browsing this forum: Google [Bot] and 35 guests