From: Wendell Hatcher <wendellhatcher1074@gmail.com>
To: Proxmox VE user list <pve-user@lists.proxmox.com>
Subject: [PVE-User] Additional ip added to my interfaces file persist on network with a new dev
Date: Mon, 25 Oct 2021 10:01:26 -0400 [thread overview]
Message-ID: <61b71659-eb46-25e5-cc40-435f530e13c9@gmail.com> (raw)
Hello, I am trying to add my second ip to my network and have updated my
network interfaces file but additional ip per the
> > documentation isn't being seen on dev eno1:1
> >
> >
https://docs.hetzner.com/robot/dedicated-server/ip/additional-ip-adresses/
ip address add 5.9.122.67 dev eno1:1
ip route add 5.9.122.67 dev eno1:1
# route -n
> > Kernel IP routing table
> > Destination Gateway Genmask Flags Metric Ref Use Iface
> > 0.0.0.0 5.9.122.97 0.0.0.0 UG 0 0 0 eno1
> > 5.9.122.67 0.0.0.0 255.255.255.255 UH 0 0 0 eno1
> > 5.9.122.96 5.9.122.97 255.255.255.224 UG 0 0 0 eno1
> > 5.9.122.96 0.0.0.0 255.255.255.224 U 0 0 0 eno1
> > 10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 vmbr0
> > 172.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 vmbr1
I can see the route added and then I can ping it internally but when i
do a network restart or reboot the server on the service the ip
disappears and is nolong able to ping. I have the ip in my static
interface file but it wont persist. What am I doing wrong?
interface file:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eno1
iface eno1 inet static
address 5.9.122.105/27
gateway 5.9.122.97
up route add -net 5.9.122.96 netmask 255.255.255.224 gw 5.9.122.97 dev eno1
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up echo 1 > /proc/sys/net/ipv4/conf/eno1/proxy_arp
iface eno1 inet6 static
address 2a01:4f8:162:726c::2/64
gateway fe80::1
auto eno1:1
iface eno1:1 inet static
allow-hotplug eno1:1
address 5.9.122.67/32
gateway 5.9.122.65
up route add -net 5.9.122.64 netmask 255.255.255.224 gw 5.9.122.65 dev
eno1:1
auto vmbr0
iface vmbr0 inet static
address 10.10.10.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094
hwaddress 00:50:56:00:88:1E # MAC address of the NIC, required since
Proxmox 7.0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eno1 -j
MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j
MASQUERADE
post-up iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 8080 -j
DNAT --to 10.10.10.4:8080
post-down iptables -t nat -D PREROUTING -i eno1 -p tcp --dport 8080 -j
DNAT --to 10.10.10.4:8080
post-up iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 8080 -j
DNAT --to 10.10.10.5:8080
post-down iptables -t nat -D PREROUTING -i eno1 -p tcp --dport 8080 -j
DNAT --to 10.10.10.5:8080
post-up iptables -t nat -A PREROUTING -i eno1 -p tcp --dport 8443 -j
DNAT --to 10.10.10.9:8443
post-down iptables -t nat -D PREROUTING -i eno1 -p tcp --dport 8443 -j
DNAT --to 10.10.10.9:8443
auto vmbr1
iface vmbr1 inet static
address 172.10.10.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '172.10.10.0/24' -o eno1 -j
MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '172.10.10.0/24' -o eno1 -j
MASQUERADE
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
reply other threads:[~2021-10-25 14:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61b71659-eb46-25e5-cc40-435f530e13c9@gmail.com \
--to=wendellhatcher1074@gmail.com \
--cc=pve-user@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox