SATOHOST
No Result
View All Result
Thứ Tư, Tháng Một 27, 2021
  • Login
  • vps giá rẻ
  • cpanel nulled
  • bitcoin exchange script
  • Home 1
Subscribe
SATOHOST
  • vps giá rẻ
  • cpanel nulled
  • bitcoin exchange script
  • Home 1
No Result
View All Result
SATOHOST
No Result
View All Result
Home Blog

OpenBSD Change, Add or Display Default Gateway

admin by admin
Tháng Sáu 3, 2019
in Blog
3 min read
0
152
SHARES
1.9k
VIEWS
Share on FacebookShare on Twitter

How do I change existing openbsd gateway (openbsd routing) IP address? How do I see current routing table under OpenBSD?

OpenBSD uses a special file to store default gateway in /etc/mygate file. You need to put the IP of your gateway in the file /etc/mygate. This will allow your gateway to be set upon boot. The gateway is added to the routing tables by the route utility. If /etc/mygate does not exist, no default gateway is added to the routing tables. The file may contain gateway addresses for both IPv4 and IPv6 networks: in dotted quad notation for v4 (e.g. 192.0.2.0) or in colon notation for v6 (e.g. 2001:1234:5678::1). Each address must be specified on a separate line. If more than one address of a specific family is found, only the first is used – all other addresses of that family are ignored.

Task: Display default gateway

Type the following command
$ cat /etc/mygate
Output:

75.126.68.49

75.126.68.49 is the router IP address.

You can also type any one of the following command to display router IP address:
$ route show
OR
$ netstat -rn
Output:

Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use    Mtu  Interface
default            75.126.68.49       UGS         7     1203      -   pcn0
75.126.68.48/29    link#1             UC          1        0      -   pcn0
75.126.68.49       00:15:c7:32:a0:00  UHLc        1        0      -   pcn0
127/8              127.0.0.1          UGRS        0        0  33192   lo0
127.0.0.1          127.0.0.1          UH          1        0  33192   lo0
224/4              127.0.0.1          URS         0        0  33192   lo0
Internet6:
Destination                        Gateway                        Flags    Refs      Use    Mtu  Interface
::/104                             ::1                            UGRS        0        0      -   lo0
::/96                              ::1                            UGRS        0        0      -   lo0
::1                                ::1                            UH         12        0  33192   lo0
::127.0.0.0/104                    ::1                            UGRS        0        0      -   lo0
::224.0.0.0/100                    ::1                            UGRS        0        0      -   lo0
::255.0.0.0/104                    ::1                            UGRS        0        0      -   lo0
::ffff:0.0.0.0/96                  ::1                            UGRS        0        0      -   lo0
2002::/24                          ::1                            UGRS        0        0      -   lo0
2002:7f00::/24                     ::1                            UGRS        0        0      -   lo0
2002:e000::/20                     ::1                            UGRS        0        0      -   lo0
2002:ff00::/24                     ::1                            UGRS        0        0      -   lo0
fe80::/10                          ::1                            UGRS        0        0      -   lo0
fe80::%pcn0/64                     link#1                         UC          0        0      -   pcn0
fe80::20c:29ff:fe7b:6672%pcn0      00:0c:29:7b:66:72              UHL         0        0      -   lo0
fe80::%lo0/64                      fe80::1%lo0                    U           0        0      -   lo0
fe80::1%lo0                        link#5                         UHL         0        0      -   lo0
fec0::/10                          ::1                            UGRS        0        0      -   lo0
ff01::/32                          ::1                            UC          0        0      -   lo0
ff02::%pcn0/32                     link#1                         UC          0        0      -   pcn0
ff02::%lo0/32                      ::1                            UC          0        0      -   lo0

Task: Update or change OpenBSD default gateway

Open /etc/mygate file using a text editor such as vi, enter:
# vi /etc/mygate
Remove existing IP and put the new IP address:
75.126.68.100
Save and close the file. To activate the changes type the following command:
# sh /etc/netstart

Share on Facebook Twitter

Posted by: SXI ADMIN

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Tags: blog
admin

admin

Related Posts

Blog

LINUX BACKUP & RESTORE FULL OS

Tháng Mười Hai 16, 2020
Blog

VPS Ram 4GB Chỉ 199k/tháng Miễn Phí Gsuite,

Tháng Tám 29, 2020
Blog

Tài Khoản Google Drive Unlimited 2020 50k – Google Drive Không Giới Hạn – Google drive unlimited 2020

Tháng Bảy 11, 2020
Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)
Blog

Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Tháng Bảy 11, 2020
Blog

Hướng dẫn kích hoạt bản quyền Windows Server 2012 R2 không cần crack

Tháng Sáu 10, 2020
Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z
Blog

Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Tháng Sáu 4, 2020
Hướng dẫn Tự Tạo Ứng Dụng Họp Online Phòng Học Online Miễn Phí với Jitsi
Blog

Hướng dẫn Tự Tạo Ứng Dụng Họp Online Phòng Học Online Miễn Phí với Jitsi

Tháng Tư 13, 2020
Hướng dẫn sử dụng Remote Desktop để truy cập VPS
Blog

Hướng dẫn sử dụng Remote Desktop để truy cập VPS

Tháng Tư 12, 2020
Download Kali Linux 2020.1
Blog

Download Kali Linux 2020.1

Tháng Tư 12, 2020
vps giá rẻ
  • Trending
  • Comments
  • Latest
Hướng dẫn cài DirectAdmin Nulled mới nhất 2020

Hướng dẫn cài DirectAdmin Nulled mới nhất 2020

Tháng Sáu 10, 2020
Wowza Streaming Engine 4.7.7 Crack Linux/Windows

Wowza Streaming Engine 4.7.7 Crack Linux/Windows

Tháng Mười Một 15, 2020
Nén và giải nén trong linux centos 6 centos 7 nén zip, tar.gz và tar.bz2.

Khuyến mãi vps 50k/tháng SSD 50Gb

Tháng Sáu 15, 2019
Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Tháng Bảy 11, 2020

Cpanel Nulled Cpanel/whm Nulled on Centos VPS/Dedicated Servers

Tháng Mười 8, 2020
Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Tháng Sáu 4, 2020

LINUX BACKUP & RESTORE FULL OS

0

Milestones & Timeline

0

The Economics of Websites

0

The Landing Page Guide

0

The Next Big Thing

0

UX Design Is Easy

0

LINUX BACKUP & RESTORE FULL OS

Tháng Mười Hai 16, 2020

VPS Ram 4GB Chỉ 199k/tháng Miễn Phí Gsuite,

Tháng Tám 29, 2020

Tài Khoản Google Drive Unlimited 2020 50k – Google Drive Không Giới Hạn – Google drive unlimited 2020

Tháng Bảy 11, 2020
Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Bán tài khoản MOVO CASH USA ACCOUNT (VCC+VBA)

Tháng Bảy 11, 2020

Hướng dẫn kích hoạt bản quyền Windows Server 2012 R2 không cần crack

Tháng Sáu 10, 2020
Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Hướng dẫn cài đặt và cấu hình Openstack toàn tập từ A-Z

Tháng Sáu 4, 2020
  • vps giá rẻ
  • cpanel nulled
  • bitcoin exchange script
  • Home 1
Call us: 0975757375

© 2020

No Result
View All Result
  • vps giá rẻ
  • cpanel nulled
  • bitcoin exchange script
  • Home 1

© 2020

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In