OpenBSD Change, Add or Display Default Gateway

OpenBSD Change, Add or Display Default Gateway

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:

  1. To add a default gateway:
refer to:‮iruttual‬.com
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.

  1. To change the 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.

  1. To display the 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.

Created Time:2017-10-30 10:17:53  Author:lautturi