Re: Creating a bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/14/23 18:54, Alex wrote:
Hi,
I've just installed fedora38 over my previous fedora install but didn't
save my network config that included a bridge to allow for local IPs for my
virtual machines. Is there a network tool that I can use to create a bridge
so I can then use the bridge option with virt-manager to assign IPs to my
Win10 virtual machine?

I'm used to doing the old-school network-scripts/ifcfg-eth0 stuff by hand,
but realize that doesn't exist anymore.

Perhaps someone has a basic /etc/NetworkManager/system-connections bridge
config they could paste here to get me started or the proper nmcli commands
I need?

I suppose I could probably also use NAT, but I'd rather have my gateway
doing the NAT.

# ip addr
</snip>
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state
DOWN group default qlen 1000
     link/ether 52:54:00:c8:a0:df brd ff:ff:ff:ff:ff:ff
     inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
        valid_lft forever preferred_lft forever


Yet another use for "ip".

ip link add name virbr0 type bridge
ip link set virbr0 up
ip addr add 192.168.122.1/24 virbr0

To manually add a port to the bridge:

ip link set ethX up
ip link set ethX master virbr0

To manually remove a port from the bridge:

ip link set ethX nomaster

Somewhere using your favorite firewalling tool you'll need to effect something like this:

*filter
:FORWARD ACCEPT [0:0]

*nat
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux