-
TheTim0Nat0r
Hi there! Does anyone know how to configure a static route or add a default gateway in lxc or kvm? Normally in a linux machine I would do that in /etc/network/interfaces.d/<interface> with nano and restart networking service, but the directory's empty
-
TheTim0Nat0r
Also tried "ip route add" and "route add default gw" but got errors operation not permitted or unknown error -122
-
dbrooke
for the default route there's a property nics.*.gateways
-
TheTim0Nat0r
dbrooke: I keep getting "Static gateways must be IPv4 addresses" if I try that
-
nbjoerg
are you using host names?
-
TheTim0Nat0r
No, just IPv4 and IPv6 adresses
-
dbrooke
I think it only takes IPv4
-
rmustacc
You may be able to use the /native route tool to add a route.
-
dbrooke
I just checked my definitions and I'm only specifying the IPv4 gateway in the JSON - the IPv6 gateway is picked up from the router advertisement (via rdnssd on linux)
-
pjustice
Don't you have to set the promiscuous permission on the zone before it can do arbitrary IP address things?
-
dbrooke
sorry i mean that for the IPv6 DNS advertisement you need rdnssd
-
pjustice
i.e. in the nics block,
-
pjustice
"allow_dhcp_spoofing": true,
-
pjustice
"allow_ip_spoofing": true,
-
pjustice
"allow_mac_spoofing": true,
-
pjustice
"allow_restricted_traffic": true,
-
pjustice
one or more of those
-
nbjoerg
allow_ip_spoofing is only necessary for kvm/bhyve, not for native zones
-
nbjoerg
(for addrconf)
-
TheTim0Nat0r
The global zone picked up the IPv6 gateway from router advertisements as well. I have made several virtual lx/kvm instances with static IPv6-addresses(allowed ip spoofing of course), but I cannot use them without a static IPv6 gateway and it does not get assigned automatically by the global zone like native zones
-
TheTim0Nat0r
Can not assign IPv6 gateway or configure a default route manually in the lxc or kvm instance either
-
nbjoerg
TheTim0Nat0r: does your kvm guest use privacy extensions?
-
nbjoerg
I'm using SLAAC exclusively
-
nbjoerg
and with the exception of the ip spoofing bug for kvm/bhyve, that works reliable
-
TheTim0Nat0r
nbjoerg: Just ip spoofing, nothing else. I am using SLAAC as well and that works like a charm. But I can not contact anything through IPV6 with a static non-EUI64 IPv6 address(so without SLAAC), because there's no static IPv6 gateway assigned.
-
TheTim0Nat0r
SmartOS does not provide functionality to provide a static IPv6-gateway(There's an old ticket ) and it seems like the virtual instances also do not allow us to modify this with ip or route or in /etc/network/interfaces.d in case of linux
-
dbrooke
my debian bhyve HVMs with static IPs and a static IPv4 gw do pick up the IPv6 gw from router advertisement so I'm not sure why that's not happening for you
-
TheTim0Nat0r
dbrooke: Okay, so if I understood well : your debian has both static IPv4 and static non-EUI64 IPv6(without SLAAC) and picked up the IPv6 gateway on its own?
-
dbrooke
here's one my (anonymised) nics definitions
stuff.dbrooke.me.uk/sp-B3Sif2.zzz
-
dbrooke
and it has default via fe80::db:f4ff:febd:fd00 dev net0 proto ra metric 1024 expires 1760sec pref medium
-
TheTim0Nat0r
Hmm, I see. Will continue my troubleshooting journey in that case.
-
dbrooke
for completeness, that's bhyve and "image_uuid": "6ae6054a-95f7-4f8e-a3f7-88d1d22301bf" and I'm not aware of configuring or installing anything in order to make the gw assignment work