Created bridge to sort VM, dropped the network...?

sapster77

Cadet
Joined
Mar 17, 2022
Messages
6
Hi,
TrueNAS scale 22.02.0.
In order to be able to mount a samba share on a VM, I created a bridge so the VM guest could see the host.
Used this guide:
https://www.truenas.com/community/threads/vms-cant-see-host.88517/
which worked fine (VMs can see host). So now I have a bridge (br0) with a static IP 192.168.1.25 and a enp1s0 as a member of the bridge.
I seems this fixed the issue with the VMs but has killed the network connection for K3s (apps are not running) and truecharts cannot access the catalogs. My openvpn server has also failed as I can no longer access it from outside my LAN (OK from inside). So it's probably some forwarding issue.
Tried this, but this is not absolutely not my strong side, and had no effect.

iptables -A FORWARD -i br0 -o enp1s0 -j ACCEPT
iptables -A FORWARD -i enp1s0 -o br0 -m state --state ESTABLISHED,RELATED \
-j ACCEPT
iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE

All ideas and help are very much appreciated. Thank you,
 

sapster77

Cadet
Joined
Mar 17, 2022
Messages
6
SOLVED.
Stupid mistake by me. After creating the bridge I had not changed apps-> advanced -> interface to the new bridge. Now it works:)
 

newguy123

Dabbler
Joined
Jun 5, 2022
Messages
23
i just want to confirm bc i am trying to do exactly this. you clicked apps -> settings -> advanced settings? when i do this nothing happens for some reason.
also, i am trying to run an openvpn server as well and have the bridge setup for my windows vm. how did u configure the openvpn server to be accesible to clients outside your network with the bridge in place?
thanks for the help!
 

newguy123

Dabbler
Joined
Jun 5, 2022
Messages
23
iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE

found out this was the line i needed, but i needed to delete my previous entry from iptables (and sometimes it needs a restart as well) first
delete line looks like this:
iptables -t nat -D POSTROUTING -s 192.168.2.0/24 -o enp3s0 -j MASQUERADE
 
Top