Replies: 5 comments 7 replies
-
I made my own setup like this: Netns with
And forwarding from tap to vpeer according to network setup guide with iptables inside the netns. While this works, it requires 6 iptables rules (7, if also making a clone address with DNAT accessible from outside the netns) and can probably somehow be simplified. Plus, why does the original guide not work like I described? |
Beta Was this translation helpful? Give feedback.
-
After some more networking pain I reduced the amount of necessary rules from 7 to 5 so I'm actually gonna stick with my solution instead of the broken one in the docs:
1 (inside netns) - mark connections from guest as connections from inside netns |
Beta Was this translation helpful? Give feedback.
-
Hi, I actually tried the guide myself and I run into the same issues, it is not functional. I thought it could be fixed with @kanpov what is the rule you call |
Beta Was this translation helpful? Give feedback.
-
Provided an updated guide in #4848. I think that at least works with what we have in the integration tests even if it's not optimal. Also removed the performance section since we don't have a way of rerunning those tests. |
Beta Was this translation helpful? Give feedback.
-
Update on this: after #4877 gets merged with major improvements to the mainline network setup doc, I'm gonna be working on de-crusting the network-for-clones setup as well, with nftables support and less rules as described above. |
Beta Was this translation helpful? Give feedback.
-
I followed the guide and got ssh to 192.168.0.3 from default netns to work, but pinging 1.1.1.1 from the guest fails.
ip a
on default netns:ip r
on default netns:ip a
in vm netns:ip r
in vm netns:iptables -t nat -vnL
in vm netns:Using default ubuntu-22.04.ext4 rootfs with its guest mac setup and
ip r a default via 172.16.0.1
in the guest.I think there might be an error in the guide since connecting to the guest makes sense (192.168.0.3 through to tap through to guest), but how would NATing the packets to 192.168.0.3 result in them going to my actual network interface (
wlp1s0
)? There aren't any routes or iptables rules being set up in the guide that would point 192.168.0.3 at the correct network interface, or am I missing something?Beta Was this translation helpful? Give feedback.
All reactions