Cannot access vio0 remotely after changing from autoconf to static IP address
0
votes
0
answers
36
views
I have a hosted VPS running OpenBSD 7.6. It provides services on the private network (
Netmask/Bitmask: 255.255.255.0
Gateway: 203.0.113.1
What am I missing?
vio1
) via requests sent from a reverse proxy on that network. The initial networking configuration was created by the installer, with inet autoconf
being the configuration of hostname.vio0
and hostname.vio1
configured as below.
I am working on adding new services that require the server to send requests from the same public IP address that requests are received on.
I have successfully configured the reverse proxy server such that the server can use the reverse proxy on vio1
as the default gateway, but I would prefer to still have direct SSH access to the server on vio0
. I have attempted many different configurations, and the server does not respond on vio0
using TCP or ICMP for any of them.
$ cat /etc/hostname.vio0
inet 203.0.113.55 0xffffff00
!route add 203.0.113.55 203.0.113.1
$ cat /etc/hostname.vio1
inet 172.16.27.15 0xffff0000
$ cat /etc/mygate
172.16.23.14
$ route -n show -inet
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Prio Iface
default 172.16.23.14 UGS 5 33230 - 8 vio1
224/4 127.0.0.1 URS 0 0 32768 8 lo0
127/8 127.0.0.1 UGRS 0 0 32768 8 lo0
127.0.0.1 127.0.0.1 UHhl 1 2 32768 1 lo0
172.16/16 172.16.27.5 UCn 2 76 - 4 vio1
172.16.8.18 00:16:61:69:44:2d UHLc 0 79 - 3 vio1
172.16.23.14 00:16:2c:9a:37:a5 UHLch 1 69 - 3 vio1
172.16.27.15 00:16:a9:ad:ce:dd UHL1 0 42 - 1 vio1
172.16.255.255 172.16.27.15 UHb 0 0 - 1 vio1
203.0.113/24 203.0.113.55 UCn 1 0 - 4 vio0
203.0.113.1 00:16:69:c6:98:13 UHLch 1 34 - 3 vio0
203.0.113.55 00:16:31:cb:96:41 UHL1 0 33 - 1 vio0
203.0.113.55 203.0.113.1 UGHS 0 0 - 0 vio0
203.0.113.255 203.0.113.55 UHb 0 0 - 1 vio0
$ ifconfig vio
vio0: flags=2008843 mtu 1500
lladdr 00:16:31:cb:96:41
index 1 priority 0 llprio 3
media: Ethernet autoselect
status: active
inet 203.0.113.55 netmask 0xffffff00 broadcast 203.0.113.255
vio1: flags=2008843 mtu 1500
lladdr 00:16:a9:ad:ce:dd
index 2 priority 0 llprio 3
groups: egress
media: Ethernet autoselect
status: active
inet 172.16.27.15 netmask 0xffff0000 broadcast 172.16.255.255
$ doas cat /etc/pf.conf
ext_if = "vio0"
int_if = "vio1"
admin = "192.0.2.20"
set skip on lo
block in quick on $ext_if from urpf-failed
pass in quick on $ext_if proto tcp from $admin to port ssh
block all
pass out on $ext_if all
pass out on $int_if all
pass inet proto icmp-type 3 code 4
pass inet proto icmp-type 8 code 0
pass inet proto icmp-type 11 code 0
# By default, do not permit remote connections to X11
block return in on ! lo0 proto tcp to port 6000:6010
# Port build user does not need network
block return out log proto {tcp udp} user _pbuild
The hosting ISP can assign the public IP address using DHCP, but also provides the resolver IP address and the following networking information for the instance in their dashboard:
IP address: 203.0.113.55Netmask/Bitmask: 255.255.255.0
Gateway: 203.0.113.1
What am I missing?
Asked by Paul
(537 rep)
Feb 1, 2025, 02:28 AM
Last activity: Feb 3, 2025, 12:57 PM
Last activity: Feb 3, 2025, 12:57 PM