To change, add, or display the default gateway on an OpenBSD system, you can use the route
command. Here are some examples of how you can use the route
command to manage the default gateway:
route add default gw 192.168.1.1
This command will add a default gateway with the IP address 192.168.1.1
. Replace this IP address with the actual IP address of your default gateway.
route change default gw 192.168.1.2
This command will change the default gateway to 192.168.1.2
. Replace this IP address with the actual IP address of your new default gateway.
route get default
This command will display the current default gateway, along with its destination and gateway IP addresses.
Keep in mind that these are just a few examples of the various options available with the route
command. You can find more information by consulting the command's manual page or by searching online.