Blob


1 version=pmwiki-2.3.20 ordered=1 urlencoded=1
2 agent=w3m/0.5.3+git20230121
3 author=jrmu
4 charset=UTF-8
5 csum=
6 ctime=1616122206
7 host=104.167.242.140
8 name=Ifconfig.Change
9 rev=16
10 targets=Hostnameif.Static,Vmctl.Usage,Openbsd.Ping,Openbsd.Netcat,Openbsd.Traceroute,Nsd.Configure,Znc.Chroot,Ngircd.Install,Unbound.Configure,Relayd.Acceleration,Pf.Guide
11 text=Before migrating IP addresses, make sure to read the%0a[[hostnameif/static|static networking guide]] to learn how configuration%0ais performed.%0a%0aSuppose your old IPv4 address is 192.168.1.2, and your new IPv4 address is%0a10.0.1.3. The old default gateway was 192.168.1.1 with subnet mask%0a255.255.255.0. The new default gateway is 10.0.0.1, with subnet mask%0a255.255.255.0. Your old IPv6 address is 2001:db8:1::1, and your new IPv6%0aaddress is 2001:db8:2::2. The default gateway remains the same,%0a2001:db8::1, with prefix length 48.%0a%0a|| border=1 width=100%25 class="sortable simpletable"%0a||! ||! Old ||! New ||%0a|| IPv4 || 192.168.1.2 || 10.0.1.3 ||%0a|| Default Gateway || 192.168.1.1 || 10.0.0.1 ||%0a|| Subnet Mask || 255.255.255.0 or 0xffffffff || 255.255.255.128 or 0xffffff80 ||%0a|| IPv6 || 2001:db8:1::1 || 2001:db8:2::2 ||%0a|| Default Gateway || 2001:db8::1 || 2001:db8::1 ||%0a|| Prefix Length || 48 || 48 ||%0a%0a!! Configuring /etc/hostname.if%0a%0aFirst you will need to configure your [[https://man.openbsd.org/hostname.if|hostname.if]] configuration file. If you have a [[https://man.openbsd.org/virtio|virtio]] network device, edit @@/etc/hostname.vio0@@ to the following:%0a%0a[@%0ainet 10.0.1.3 0xffffff80%0ainet alias 192.168.1.2 0xffffffff%0ainet6 2001:db8:2::2 48%0ainet6 alias 2001:db8:1::1 48%0a@]%0a%0aThe first line configures the IP addresses, 10.0.1.3. The subnet mask here could be written as either 255.255.255.128 (in dotted quad notation) or as 0xffffff80 (in hexadecimal notation). They are both equivalent.%0a%0aThe second line creates an aliased IP address 192.168.1.2. This will allow your VPS to use either IP address. The subnet mask here should be set to 0xffffffff or 255.255.255.255 because it's an aliased IP address.%0a%0aThe third line configures the IPv6 address 2001:db8:2::2 with a prefix length of 48. The fourth line configures the alias 2001:db8:1::1, with a prefix length of 48.%0a%0a!! Configuring /etc/mygate%0a%0aYou will next need to update your default gateway:%0a%0a[@%0a10.0.0.1%0a2001:db8::1%0a@]%0a%0a!! Restarting networking%0a%0aDisable the network interface, flush old routes, then restart networking:%0a%0a'''WARNING''': This step will cause network disconnections. If any files are%0amisconfigured, you may not be able to reconnect. Make sure you have%0a[[vmctl/usage|serial console]] access before proceeding:%0a%0a[@%0a$ doas ifconfig vio0 down && doas route flush && doas sh /etc/netstart%0a@]%0a%0a!! Stale hostname%0a%0aIf you change your host's IP address, double check /etc/hosts to ensure there%0aare no old, stale values that could intercept name lookup.%0a%0a!! Test New IP Adddress%0a%0aAfter adding an IP address, make sure to test it using [[openbsd/ping|ping]], [[openbsd/netcat|netcat]], and [[openbsd/traceroute|traceroute]].%0a%0aFor example:%0a%0a[@%0a$ ping -I 10.0.1.3 8.8.8.8%0a$ ping6 -I 2001:db8:2::2 2607:f8b0:400a:80a::200e%0a@]%0a%0aIf after waiting 30 seconds, ping shows 100%25 packet loss, then networking has failed.%0a%0a!! Other Network Services%0a%0a|| border=1 width=100%25 class="sortable simpletable"%0a||! Action ||! Description ||%0a|| [[hostnameif/static|Static Networking]] || Update ifconfig, /etc/mygate, and /etc/hostname.if0 ||%0a|| [[nsd/configure|NSD]] || Update the IP addresses in nsd.conf, and update records in zone files ||%0a|| [[znc/chroot|ZNC]] || Update the IP addresses in znc.conf's listeners ||%0a|| [[ngircd/install|ngircd]] || Update the Listen = IP addresses in ngircd.conf ||%0a|| [[unbound/configure|Unbound]] || Update the outgoing-interfaces in unbound.conf ||%0a|| [[Relayd/Acceleration|Relayd]] || Update IP addresses in relayd.conf ||%0a|| [[Pf/guide|Packet Filter]] || Update Packet Filter ||%0a|| [[openbsd/ping|Ping]] || Troubleshoot networking using ping ||%0a|| [[openbsd/netcat|Netcat]] || Troubleshoot networking using netcat ||%0a
12 time=1709316247
13 author:1709316247=jrmu
14 diff:1709316247:1707030675:=43,44c43,46%0a%3c 10.0.0.1%0a%3c 2001:db8::1%0a---%0a> inet 10.0.1.3 0xffffff80%0a> inet alias 192.168.1.2 0xffffffff%0a> inet6 2001:db8:2::2 48%0a> inet6 alias 2001:db8:1::1 48%0a
15 host:1709316247=104.167.242.140
16 author:1707030675=jrmu
17 diff:1707030675:1707030523:=88,89d87%0a%3c || [[Relayd/Acceleration|Relayd]] || Update IP addresses in relayd.conf ||%0a%3c || [[Pf/guide|Packet Filter]] || Update Packet Filter ||%0a
18 host:1707030675=104.167.242.140
19 author:1707030523=jrmu
20 diff:1707030523:1707030190:=65,77d64%0a%3c %0a%3c !! Test New IP Adddress%0a%3c %0a%3c After adding an IP address, make sure to test it using [[openbsd/ping|ping]], [[openbsd/netcat|netcat]], and [[openbsd/traceroute|traceroute]].%0a%3c %0a%3c For example:%0a%3c %0a%3c [@%0a%3c $ ping -I 10.0.1.3 8.8.8.8%0a%3c $ ping6 -I 2001:db8:2::2 2607:f8b0:400a:80a::200e%0a%3c @]%0a%3c %0a%3c If after waiting 30 seconds, ping shows 100%25 packet loss, then networking has failed.%0a
21 host:1707030523=104.167.242.140
22 author:1707030190=jrmu
23 diff:1707030190:1707027912:=49,60d48%0a%3c !! Restarting networking%0a%3c %0a%3c Disable the network interface, flush old routes, then restart networking:%0a%3c %0a%3c '''WARNING''': This step will cause network disconnections. If any files are%0a%3c misconfigured, you may not be able to reconnect. Make sure you have%0a%3c [[vmctl/usage|serial console]] access before proceeding:%0a%3c %0a%3c [@%0a%3c $ doas ifconfig vio0 down && doas route flush && doas sh /etc/netstart%0a%3c @]%0a%3c %0a63,65c51,54%0a%3c If you change your host's IP address, double check /etc/hosts to ensure there%0a%3c are no old, stale values that could intercept name lookup.%0a%3c %0a---%0a> If you change your host's IP address, /etc/hosts may be intercepting the name lookup and giving you the old IP address.%0a> %0a> Make sure there is no entry in the /etc/hosts files that is causing your machine to use the old IP.%0a> %0a70,72c59,61%0a%3c || [[hostnameif/static|Static Networking]] || Update ifconfig, /etc/mygate, and /etc/hostname.if0 ||%0a%3c || [[nsd/configure|NSD]] || Update the IP addresses in nsd.conf, and update records in zone files ||%0a%3c || [[znc/chroot|ZNC]] || Update the IP addresses in znc.conf's listeners ||%0a---%0a> || [[openbsd/staticnet|Static Networking]] || Update ifconfig, /etc/mygate, and /etc/hostname.if0 ||%0a> || [[nsd/configure|NSD]] || Update the IPv6 addresses in nsd.conf and the zone file ||%0a> || [[znc/chroot|ZNC]] || Update the IPv6 addresses in znc.conf's listeners ||%0a74c63%0a%3c || [[unbound/configure|Unbound]] || Update the outgoing-interfaces in unbound.conf ||%0a---%0a> || [[unbound/configure|Unbound]] || Update the outgoing-interface in unbound.conf ||%0a
24 host:1707030190=104.167.242.140
25 author:1707027912=jrmu
26 diff:1707027912:1707027368:=49,56c49,50%0a%3c !! Stale hostname%0a%3c %0a%3c If you change your host's IP address, /etc/hosts may be intercepting the name lookup and giving you the old IP address.%0a%3c %0a%3c Make sure there is no entry in the /etc/hosts files that is causing your machine to use the old IP.%0a%3c %0a%3c !! Other Network Services%0a%3c %0a---%0a> %0a> %0a65a60,85%0a> %0a> %0a> %0a> || border=1 width=100%25 class="sortable simpletable"%0a> ||! IPv4 Address ||! IPv4 Gateway ||! IPv6 Address ||! IPv6 Gateway ||%0a> || 38.81.163.xxx || 38.81.163.129 || 2602:fccf:1:xxx::/64 || 2602:fccf:1::1 ||%0a> %0a> To find your IPv4 address:%0a> %0a> [@%0a> $ dig -t a @coconut.ircnow.org username.coconut.ircnow.org%0a> @]%0a> %0a> To find your IPv6 address:%0a> %0a> [@%0a> $ dig -t aaaa @coconut.ircnow.org username.coconut.ircnow.org%0a> @]%0a> %0a> Checklist of networking topics to re-read:%0a> %0a> !! Stale hostname%0a> %0a> If you ever change your host's IP address, /etc/hosts may be intercepting the name lookup and giving you the old IP address.%0a> %0a> Make sure there is no entry in the /etc/hosts files that is causing your machine to use the old IP.%0a
27 host:1707027912=104.167.242.140
28 author:1707027368=jrmu
29 diff:1707027368:1707026511:=8,11c8,11%0a%3c 255.255.255.0. Your old IPv6 address is 2001:db8:1::1, and your new IPv6%0a%3c address is 2001:db8:2::2. The default gateway remains the same,%0a%3c 2001:db8::1, with prefix length 48.%0a%3c %0a---%0a> 255.255.255.0. Your old IPv6 address is 2001:0db8:1::1, and your new IPv6%0a> address is 2001:0db8:2::2. The default gateway remains the same,%0a> 2001:0db8::1, with prefix length 48.%0a> %0a15,18c15,18%0a%3c || Default Gateway || 192.168.1.1 || 10.0.0.1 ||%0a%3c || Subnet Mask || 255.255.255.0 or 0xffffffff || 255.255.255.128 or 0xffffff80 ||%0a%3c || IPv6 || 2001:db8:1::1 || 2001:db8:2::2 ||%0a%3c || Default Gateway || 2001:db8::1 || 2001:db8::1 ||%0a---%0a> || Default Gateway || 192.168.1.1 || ||%0a> || Subnet Mask || 255.255.255.0 || 255.255.255.128 or 0xffffff80 ||%0a> || IPv6 || 2001:0db8:1::1 || 2001:0db8:2::2 ||%0a> || Default Gateway || 2001:0db8::1 || 2001:0db8::1 ||%0a21,24c21,24%0a%3c !! Configuring /etc/hostname.if%0a%3c %0a%3c First you will need to configure your [[https://man.openbsd.org/hostname.if|hostname.if]] configuration file. If you have a [[https://man.openbsd.org/virtio|virtio]] network device, edit @@/etc/hostname.vio0@@ to the following:%0a%3c %0a---%0a> !! Adding new IPv4 address%0a> %0a> If you have a [[https://man.openbsd.org/virtio|virtio]] network device, edit @@/etc/hostname.if to add the following:%0a> %0a26,29c26,29%0a%3c inet 10.0.1.3 0xffffff80%0a%3c inet alias 192.168.1.2 0xffffffff%0a%3c inet6 2001:db8:2::2 48%0a%3c inet6 alias 2001:db8:1::1 48%0a---%0a> inet 192.168.1.2 255.255.255.0%0a> inet alias 192.168.1.3 255.255.255.255%0a> inet6 2001:0db8:0000:0000:0000:0000:0000:0000 48%0a> inet6 alias 2001:0db8:0000:0000:9b1d:3511:387e:143a 48%0a32,47d31%0a%3c The first line configures the IP addresses, 10.0.1.3. The subnet mask here could be written as either 255.255.255.128 (in dotted quad notation) or as 0xffffff80 (in hexadecimal notation). They are both equivalent.%0a%3c %0a%3c The second line creates an aliased IP address 192.168.1.2. This will allow your VPS to use either IP address. The subnet mask here should be set to 0xffffffff or 255.255.255.255 because it's an aliased IP address.%0a%3c %0a%3c The third line configures the IPv6 address 2001:db8:2::2 with a prefix length of 48. The fourth line configures the alias 2001:db8:1::1, with a prefix length of 48.%0a%3c %0a%3c !! Configuring /etc/mygate%0a%3c %0a%3c You will next need to update your default gateway:%0a%3c %0a%3c [@%0a%3c inet 10.0.1.3 0xffffff80%0a%3c inet alias 192.168.1.2 0xffffffff%0a%3c inet6 2001:db8:2::2 48%0a%3c inet6 alias 2001:db8:1::1 48%0a%3c @]%0a
30 host:1707027368=104.167.242.140
31 author:1707026511=jrmu
32 diff:1707026511:1616238915:=1,11c1,12%0a%3c Before migrating IP addresses, make sure to read the%0a%3c [[hostnameif/static|static networking guide]] to learn how configuration%0a%3c is performed.%0a%3c %0a%3c Suppose your old IPv4 address is 192.168.1.2, and your new IPv4 address is%0a%3c 10.0.1.3. The old default gateway was 192.168.1.1 with subnet mask%0a%3c 255.255.255.0. The new default gateway is 10.0.0.1, with subnet mask%0a%3c 255.255.255.0. Your old IPv6 address is 2001:0db8:1::1, and your new IPv6%0a%3c address is 2001:0db8:2::2. The default gateway remains the same,%0a%3c 2001:0db8::1, with prefix length 48.%0a%3c %0a---%0a> To find your IPv4 address:%0a> %0a> [@%0a> $ dig -t a @coconut.ircnow.org username.coconut.ircnow.org%0a> @]%0a> %0a> To find your IPv6 address:%0a> %0a> [@%0a> $ dig -t aaaa @coconut.ircnow.org username.coconut.ircnow.org%0a> @]%0a> %0a13,34c14,18%0a%3c ||! ||! Old ||! New ||%0a%3c || IPv4 || 192.168.1.2 || 10.0.1.3 ||%0a%3c || Default Gateway || 192.168.1.1 || ||%0a%3c || Subnet Mask || 255.255.255.0 || 255.255.255.128 or 0xffffff80 ||%0a%3c || IPv6 || 2001:0db8:1::1 || 2001:0db8:2::2 ||%0a%3c || Default Gateway || 2001:0db8::1 || 2001:0db8::1 ||%0a%3c || Prefix Length || 48 || 48 ||%0a%3c %0a%3c !! Adding new IPv4 address%0a%3c %0a%3c If you have a [[https://man.openbsd.org/virtio|virtio]] network device, edit @@/etc/hostname.if to add the following:%0a%3c %0a%3c [@%0a%3c inet 192.168.1.2 255.255.255.0%0a%3c inet alias 192.168.1.3 255.255.255.255%0a%3c inet6 2001:0db8:0000:0000:0000:0000:0000:0000 48%0a%3c inet6 alias 2001:0db8:0000:0000:9b1d:3511:387e:143a 48%0a%3c @]%0a%3c %0a%3c %0a%3c %0a%3c %0a---%0a> ||! IPv4 Address ||! IPv4 Gateway ||! IPv6 Address ||! IPv6 Gateway ||%0a> || 38.81.163.xxx || 38.81.163.129 || 2602:fccf:1:xxx::/64 || 2602:fccf:1::1 ||%0a> %0a> Checklist of networking topics to re-read:%0a> %0a45,64d28%0a%3c %0a%3c %0a%3c || border=1 width=100%25 class="sortable simpletable"%0a%3c ||! IPv4 Address ||! IPv4 Gateway ||! IPv6 Address ||! IPv6 Gateway ||%0a%3c || 38.81.163.xxx || 38.81.163.129 || 2602:fccf:1:xxx::/64 || 2602:fccf:1::1 ||%0a%3c %0a%3c To find your IPv4 address:%0a%3c %0a%3c [@%0a%3c $ dig -t a @coconut.ircnow.org username.coconut.ircnow.org%0a%3c @]%0a%3c %0a%3c To find your IPv6 address:%0a%3c %0a%3c [@%0a%3c $ dig -t aaaa @coconut.ircnow.org username.coconut.ircnow.org%0a%3c @]%0a%3c %0a%3c Checklist of networking topics to re-read:%0a%3c %0a69c33%0a%3c Make sure there is no entry in the /etc/hosts files that is causing your machine to use the old IP.%0a---%0a> Make sure there is no entry in the /etc/hosts files that is causing your machine to use the old IP.%0a\ No newline at end of file%0a
33 host:1707026511=104.167.242.140
34 author:1616238915=jrmu
35 diff:1616238915:1616147673:=27,33c27%0a%3c || [[openbsd/netcat|Netcat]] || Troubleshoot networking using netcat ||%0a%3c %0a%3c !! Stale hostname%0a%3c %0a%3c If you ever change your host's IP address, /etc/hosts may be intercepting the name lookup and giving you the old IP address.%0a%3c %0a%3c Make sure there is no entry in the /etc/hosts files that is causing your machine to use the old IP.%0a\ No newline at end of file%0a---%0a> || [[openbsd/netcat|Netcat]] || Troubleshoot networking using netcat ||%0a\ No newline at end of file%0a
36 host:1616238915=125.231.65.235
37 author:1616147673=jrmu
38 diff:1616147673:1616147261:=1,9c1,2%0a%3c To find your IPv4 address:%0a%3c %0a%3c [@%0a%3c $ dig -t a @coconut.ircnow.org username.coconut.ircnow.org%0a%3c @]%0a%3c %0a%3c To find your IPv6 address:%0a%3c %0a%3c [@%0a---%0a> To find your IP address:%0a> %0a11d3%0a%3c @]%0a
39 host:1616147673=198.251.81.119
40 author:1616147261=jrmu
41 diff:1616147261:1616124356:=3c3%0a%3c $ dig -t aaaa @coconut.ircnow.org username.coconut.ircnow.org%0a---%0a> $ dig -t aaaa @coconut.ircnow.org error.coconut.ircnow.org%0a
42 host:1616147261=198.251.81.119
43 author:1616124356=jrmu
44 diff:1616124356:1616122732:=7c7%0a%3c || 38.81.163.xxx || 38.81.163.129 || 2602:fccf:1:xxx::/64 || 2602:fccf:1::1 ||%0a---%0a> || 38.81.163.xxx || 38.81.163.129 || 2602:fccf:1:xxxx::/64 || 2602:fccf:1::1 ||%0a
45 host:1616124356=125.231.65.235
46 author:1616122732=jrmu
47 diff:1616122732:1616122513:=9,10c9,10%0a%3c Checklist of networking topics to re-read:%0a%3c %0a---%0a> You will need to reconfigure:%0a> %0a13c13%0a%3c || [[openbsd/staticnet|Static Networking]] || Update ifconfig, /etc/mygate, and /etc/hostname.if0 ||%0a---%0a> || [[openbsd/staticnet|Static Networking]] || Configure ifconfig, /etc/mygate, and /etc/hostname.if0 ||%0a17,19c17%0a%3c || [[unbound/configure|Unbound]] || Update the outgoing-interface in unbound.conf ||%0a%3c || [[openbsd/ping|Ping]] || Troubleshoot networking using ping ||%0a%3c || [[openbsd/netcat|Netcat]] || Troubleshoot networking using netcat ||%0a\ No newline at end of file%0a---%0a> || [[unbound/configure|Unbound]] || Update the outgoing-interface in unbound.conf ||%0a\ No newline at end of file%0a
48 host:1616122732=198.251.81.119
49 author:1616122513=jrmu
50 diff:1616122513:1616122307:=14,17c14%0a%3c || [[nsd/configure|NSD]] || Update the IPv6 addresses in nsd.conf and the zone file ||%0a%3c || [[znc/chroot|ZNC]] || Update the IPv6 addresses in znc.conf's listeners ||%0a%3c || [[ngircd/install|ngircd]] || Update the Listen = IP addresses in ngircd.conf ||%0a%3c || [[unbound/configure|Unbound]] || Update the outgoing-interface in unbound.conf ||%0a\ No newline at end of file%0a---%0a> || [[nsd/configure|NSD]] || You'll need to update the IPv6 addresses in nsd.conf and the zone file ||%0a\ No newline at end of file%0a
51 host:1616122513=198.251.81.119
52 author:1616122307=jrmu
53 diff:1616122307:1616122224:=9,10d8%0a%3c You will need to reconfigure:%0a%3c %0a13,14c11,12%0a%3c || [[openbsd/staticnet|Static Networking]] || Configure ifconfig, /etc/mygate, and /etc/hostname.if0 ||%0a%3c || [[nsd/configure|NSD]] || You'll need to update the IPv6 addresses in nsd.conf and the zone file ||%0a\ No newline at end of file%0a---%0a> || Reconfigure Static Networking || You'll need to reconfigure ifconfig and /etc/hostname.if0 ||%0a> || Reconfigure Static Networking || You'll need to reconfigure ifconfig and /etc/hostname.if0 ||%0a\ No newline at end of file%0a
54 host:1616122307=198.251.81.119
55 author:1616122224=jrmu
56 diff:1616122224:1616122206:=6c6%0a%3c ||! IPv4 Address ||! IPv4 Gateway ||! IPv6 Address ||! IPv6 Gateway ||%0a---%0a> || IPv4 Address || IPv4 Gateway || IPv6 Address || IPv6 Gateway ||%0a10c10%0a%3c ||! Action ||! Description ||%0a---%0a> || Action || Description ||%0a
57 host:1616122224=198.251.81.119
58 author:1616122206=jrmu
59 diff:1616122206:1616122206:=1,12d0%0a%3c To find your IP address:%0a%3c %0a%3c $ dig -t aaaa @coconut.ircnow.org error.coconut.ircnow.org%0a%3c %0a%3c || border=1 width=100%25 class="sortable simpletable"%0a%3c || IPv4 Address || IPv4 Gateway || IPv6 Address || IPv6 Gateway ||%0a%3c || 38.81.163.xxx || 38.81.163.129 || 2602:fccf:1:xxxx::/64 || 2602:fccf:1::1 ||%0a%3c %0a%3c || border=1 width=100%25 class="sortable simpletable"%0a%3c || Action || Description ||%0a%3c || Reconfigure Static Networking || You'll need to reconfigure ifconfig and /etc/hostname.if0 ||%0a%3c || Reconfigure Static Networking || You'll need to reconfigure ifconfig and /etc/hostname.if0 ||%0a\ No newline at end of file%0a
60 host:1616122206=198.251.81.119