OpenBSD: Gateway outside subnet (works in Linux)
- by kshade
We need to set up an OpenBSD host to use a default gateway that's outside of it's subnet. This is all I need to do on Linux (not the actual IPs) to achieve it:
ifconfig eth0 33.33.33.33/31 up
route add 33.33.33.254 dev eth0
route add default gw 33.33.33.254
The problem is that we don't know the proper equivalent of the middle command in OpenBSD. The man page says:
If the destination is directly reachable via an interface requiring no intermediary system to act as a gateway, the -iface modifier should be specified;
Sadly we can't seem to figure out how to make it work with that. This is a virtual host on an OVH server, they have documentation for many other operating systems showing how to do it here: http://help.ovh.co.uk/BridgeClient