Results 1 to 3 of 3

Thread: Media server and web server

  1. #1
    Join Date
    Aug 2010
    Beans
    1

    Media server and web server

    I have Ubuntu Server 12.10 setup on a computer as a media and file server that streams content to a separate base unit, laptop, and apple TV and would like to add a web server function to the server.

    I need to add Shorewall and allow access through ports 21, 22, and 80 for the web access but what ports do I need to allow for access from my home computers for the media files? The router already has a DMZ connected to the media server's IP address.

    Thank you

  2. #2
    Join Date
    Mar 2013
    Beans
    14

    Re: Media server and web server

    hard to help when no one knows what software you are using. You can use tcpdump/wireshark while streaming content to determine the ports that need to be open.

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Media server and web server

    You could just permit your local network globally. I don't use packaged firewalls like Shorewall, but the relevant iptables rule would be something like

    Code:
    /sbin/iptables -A INPUT -s 192.168.1.0/24 -j ACCEPT
    That allows all traffic originating on the 192.168.1.0/24 network. If the forwarding router is also in the same network space, which I'd guess it is, then you'd probably need something more limiting like

    Code:
    /sbin/iptables -I INPUT -s 192.168.1.1 -p tcp --dport 21 -j ACCEPT
    /sbin/iptables -A INPUT -s 192.168.1.1 -p tcp --dport 22 -j ACCEPT
    /sbin/iptables -A INPUT -s 192.168.1.1 -p tcp --dport 80 -j ACCEPT
    /sbin/iptables -A INPUT -s 192.168.1.1 -j REJECT
    /sbin/iptables -A INPUT -s 192.168.1.0/24 -j ACCEPT
    That permits traffic from the router on ports 21, 22, and 80 and rejects any other traffic coming in from the Internet. All the machines on the local network are permitted.

    Of course, it might be easier to do all this on the router and use no firewall on the Ubuntu box.
    Last edited by SeijiSensei; March 6th, 2013 at 09:55 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

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
  •