a router is basically a limited computer.So your computer, especially easy with Linux! :) can acts as a router for your XBOX (and the rest of your internal network if you wish to share your 3g internet with more devices)
first you need iptables to manage the NAT traversal and forwarding if not already installed , in the terminal type:
sudo apt-get install iptables
and then press enter to install
then we are going to make a little script for you do make the settings nessecary for this to work
-------- snip ---------
# just a shorter name for iptables
IPTABLES='/sbin/iptables'
# internal network interface
int='eth0'
# interface to internet ,check with ifconfig , but its probably ppp0 for you
ext='eth1'
# we configure the network interface to the ip below
ifconfig $int 10.0.0.1 netmask 255.255.255.0
# ip address for the xbox
xbox='10.0.5'
# enable forwarding of packages
echo 1 > /proc/sys/net/ipv4/ip_forward
# if you wish to forward ports it would look something like this
# but change ports (1000,2000) to what your xbox requires you to forward
$iptables -t nat -A PREROUTING -p tcp -i $ext --dport 1000 -J DNAT --to $xbox
# if you need udp ports as well
$iptables -t nat -A PREROUTING -p udp -i $ext --dport 1000 -J DNAT --to $xbox
# use --dport 1000:2000 , if you need to forward a range
-------- snip ---------
save this in a text-file so you can launch it whenever you reboot your computer (since these settings dissappear after reboot)
also you need to remove your internal network card from being managed from ubuntu network manager
edit /etc/NetworkManager/NetWorkManager.conf
and enter the text:
unamanaged-devices=mac:00:23:33:ec:a0:6a
below the row with [keyfile]
(you need to change the mac adress to the one of your internal network card (check with ifconfig in the terminal)
now finally launch your script with sudo sh nameofscript.txt
and you should be good to go as soon as you connect your xbox to the network card and give it an ip address like 10.0.2 netmask 255.255.255.0
good luck! :)