There are several options for internet access with qemu, including bridging and sharing the interface with NAT.
From the command line, my VM uses the following net device options for a NAT interface:
-netdev tap,fd=26,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:2b:4f:a8,bus=pci.0,addr=0x3
with these iptables rules in POSTROUTING:
Chain POSTROUTING (policy ACCEPT 36650 packets, 6409K bytes)
pkts bytes target prot opt in out source destination
5 312 RETURN all -- * * 192.168.122.0/24 188.8.131.52/24
0 0 RETURN all -- * * 192.168.122.0/24 255.255.255.255
5 300 MASQUERADE tcp -- * * 192.168.122.0/24 !192.168.122.0/24 masq ports: 1024-65535
10 1380 MASQUERADE udp -- * * 192.168.122.0/24 !192.168.122.0/24 masq ports: 1024-65535
0 0 MASQUERADE all -- * * 192.168.122.0/24 !192.168.122.0/24
These are the defaults configured by virt-manager, which is much simpler and easier than building up your command line. For example, it also configures a DNS caching server and a DHCP server. Virt-manager also gives you the option of selecting interfaces to bridge, or selecting a NAT configuration on your primary interface, all with just a drop-down.