Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Ubuntu Server upnp?

  1. #1
    Join Date
    Dec 2007
    Beans
    97

    Ubuntu Server upnp?

    I have a home network set up as follows:
    Internet <--> Ubuntu Server <--> Router <--> Computers & XBOX

    Everything works great on the computers but the XBOX can't connect to XBOX live. It says my NAT is moderate and it needs to be open. I searched on Google and found several sites on the subject. The most relevant one that I found was published in 2006 and it said I need upnp on my server to use XBOX live properly. Does anyone know how to get the XBOX live working on my server?

  2. #2
    Join Date
    Aug 2007
    Location
    Chennai
    Beans
    522
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server upnp?

    why are you using a ubuntu server between router and internet? cant you connect straight from the router to internet.

    Internet <--> Router <---> Switch <---> Computers & XBOX.

    Simpler the above way. Enable upnp on the router (most routers support this these days) and you should be good to go.
    Report Ubuntu bugs here: Ubuntu Launchpad.
    Ubuntu Lucid 10.04 32-bit Desktop

  3. #3
    Join Date
    Dec 2007
    Beans
    97

    Re: Ubuntu Server upnp?

    I'm using the server for a web based torrent client as well as a file server and a squid proxy server.

    XBOX live works fine if I remove the server.

  4. #4
    Join Date
    Aug 2007
    Location
    Chennai
    Beans
    522
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server upnp?

    Of course XBOX will work. Forcing the Ubuntu to filter traffic is going to be difficult.

    UPNP is nothing but a simple port forwarding mechanism - only that it requires no manual input from the user. The App that requests UPNP will automatically configure rules on the gateway device that supports UPNP.

    Check what is exactly required by the XBOX and manually forward it by Squid.
    Report Ubuntu bugs here: Ubuntu Launchpad.
    Ubuntu Lucid 10.04 32-bit Desktop

  5. #5
    Join Date
    Dec 2007
    Beans
    97

    Re: Ubuntu Server upnp?

    I found this on a post at another forum:
    Code:
     
       $IPTABLES -t nat -A PREROUTING -i $WAN_IF -p tcp --dport 3074 -j DNAT --to-destination $XBOX_IP
       $IPTABLES -t nat -A PREROUTING -i $WAN_IF -p udp -m multiport --dports 88,3074 -j DNAT --to-destination $XBOX_IP
       $IPTABLES -A FORWARD -i $WAN_IF -d $XBOX_IP -p tcp --dport 3074 -j ACCEPT
       $IPTABLES -A FORWARD -i $WAN_IF -d $XBOX_IP -p udp -m multiport --dports 88,3074 -j ACCEPT
    The guy on that forum was trying to share a conection with a desktop PC running ubuntu and a wireless connection. Like this:
    Wireless <--> Desktop <--> XBOX

    He had it all set up but had the same NAT problem and he said that these mods to his iptables fixed it in his application.

    I don't really understand the $WAN_IF part. If I fill in my XBOX IP and whatever should go in the $WAN_IF spot will it work? I disabled squid for now to simplify things.

  6. #6
    Join Date
    Oct 2007
    Beans
    108

    Re: Ubuntu Server upnp?

    You do not need upnp to get xbox to work. UPNP actually should be disabled. It is seriousl the worst idea, EVER, with respect to networking security.

    Google "xbox live tcp udp ports" and you should quickly figoure out which ports to open.

  7. #7
    Join Date
    Dec 2007
    Beans
    97

    Re: Ubuntu Server upnp?

    Thanks. You guys are right I don't need upnp.
    I found the ports that I need open from the microsoft website:

    The following ports must be available to your Xbox 360 console for Xbox LIVE to operate correctly:

    * TCP 80
    * UDP 88
    * UDP 3074
    * TCP 3074
    * UDP 53
    * TCP 53

    I don't really understand what ports are or how to open them. I know it will be some kind of iptables command but that is all I know.

  8. #8
    Join Date
    Aug 2007
    Location
    Chennai
    Beans
    522
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server upnp?

    Quote Originally Posted by the_mulletator View Post
    I found this on a post at another forum:
    Code:
     
       $IPTABLES -t nat -A PREROUTING -i $WAN_IF -p tcp --dport 3074 -j DNAT --to-destination $XBOX_IP
       $IPTABLES -t nat -A PREROUTING -i $WAN_IF -p udp -m multiport --dports 88,3074 -j DNAT --to-destination $XBOX_IP
       $IPTABLES -A FORWARD -i $WAN_IF -d $XBOX_IP -p tcp --dport 3074 -j ACCEPT
       $IPTABLES -A FORWARD -i $WAN_IF -d $XBOX_IP -p udp -m multiport --dports 88,3074 -j ACCEPT
    The guy on that forum was trying to share a conection with a desktop PC running ubuntu and a wireless connection. Like this:
    Wireless <--> Desktop <--> XBOX

    He had it all set up but had the same NAT problem and he said that these mods to his iptables fixed it in his application.

    I don't really understand the $WAN_IF part. If I fill in my XBOX IP and whatever should go in the $WAN_IF spot will it work? I disabled squid for now to simplify things.
    That's a script. Anything that begins with $ is a symbolic reference. I grabbed that post from:
    Connecting to XBox Live through a linux computer connected to a wireless LAN
    .

    $IPTABLES will be either be iptables or squid equivalent. $WAN_IF is the wan interface of the squid server. $XBOX_IP will be the IP of XBOX.

    So for e.g. this command:
    Code:
    $IPTABLES -A FORWARD -i $WAN_IF -d $XBOX_IP -p udp -m multiport --dports 88,3074 -j ACCEPT
    is actually:

    Code:
    iptables -A FORWARD -i eth0 -d 192.168.1.50 -p udp -m multiport --dports 88,3074 -j ACCEPT
    where "iptables" is the command; eth0 is the interface of the squid server connected to the internet-router; and 192.168.1.50 is the IP of the XBOX.
    Report Ubuntu bugs here: Ubuntu Launchpad.
    Ubuntu Lucid 10.04 32-bit Desktop

  9. #9
    Join Date
    Dec 2007
    Beans
    97

    Re: Ubuntu Server upnp?

    I tried the following commands:
    Code:
    iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3074 -j DNAT --to-destination 192.168.0.39
    iptables -t nat -A PREROUTING -i eth0 -p udp -m multiport --dports 88,3074 -j DNAT --to-destination 192.168.0.39
    iptables -A FORWARD -i eth0 -d 192.168.0.39 -p tcp --dport 3074 -j ACCEPT
    iptables -A FORWARD -i eth0 -d 192.168.0.39 -p udp -m multiport --dports 88,3074 -j ACCEPT
    sudo /sbin/ifconfig eth1 mtu 1500
    sudo /sbin/ifconfig eth0 mtu 1500

    eht0 is my network card to my LAN
    eth1 is my network card to the internet
    192.168.0.39 is my XBOX's IP

    the XBOX still says I have a moderate NAT

    What do I need to do?

  10. #10
    Join Date
    Aug 2007
    Location
    Chennai
    Beans
    522
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Server upnp?

    Quote Originally Posted by the_mulletator View Post
    I tried the following commands:
    Code:
    iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3074 -j DNAT --to-destination 192.168.0.39
    iptables -t nat -A PREROUTING -i eth0 -p udp -m multiport --dports 88,3074 -j DNAT --to-destination 192.168.0.39
    iptables -A FORWARD -i eth0 -d 192.168.0.39 -p tcp --dport 3074 -j ACCEPT
    iptables -A FORWARD -i eth0 -d 192.168.0.39 -p udp -m multiport --dports 88,3074 -j ACCEPT
    sudo /sbin/ifconfig eth1 mtu 1500
    sudo /sbin/ifconfig eth0 mtu 1500

    eht0 is my network card to my LAN
    eth1 is my network card to the internet
    192.168.0.39 is my XBOX's IP

    the XBOX still says I have a moderate NAT

    What do I need to do?
    I forgot to give you one important detail. You need to forward all traffic from eth0 (local interface) to eth1 (internet interface). Based on your setup, the command will be:

    Code:
    iptables -t nat -A POSTROUTING -o eth1 -s 192.168.0.0/24 -j MASQUERADE
    This is assuming that 192.168.0.0/24 is the network used by eth0 and XBOX.


    In your commmands, you have given the wrong values.
    All your commands are referring to eth0 while they should refer to eth1. Your eth1 which is connected to the Internet is the WAN interface. Replace all your eth0 with eth1 in the commands.

    Before doing all this, clear all your iptable rules and start from scratch.
    Report Ubuntu bugs here: Ubuntu Launchpad.
    Ubuntu Lucid 10.04 32-bit Desktop

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •