RaspBMC IP Tables and LAN Subnets

By default, the RaspBMC system at the time of this writing includes IP Tables to block communication to the system from devices sourcing from subnets other than the locally connected segment.  This post lists the steps required to modify IP Tables to allow for the open communication to desired local subnets.

First, we will take a look at what IP Tables rules are in effect by issuing sudo iptables -L. Within this image example, you can see that we are confined to the network 192.168.1.0/27 for any connectivity. The rule of interest is in the Chain INPUT, Policy ACCEPT, Rule 2.

IP Tables Rule Listing

IP Tables Rule Listing

Next, we will need to replace this rule using the sudo iptables -R INPUT 2 -d 192.168.0.0/16 -j ACCEPT syntax.  This will replace the 192.168.1.0/27 with 192.168.0.0/16. The screen shot below is the input and verification of the command.

Replacing an IP Tables Rule

Replacing an IP Tables Rule

With the rule entered, we can now make the rule persistent by issuing iptables-save.

Now the XBMC Remote Control is working over my wireless network, which is of course on a different subnet.

XBMC Remote Control Access

XBMC Remote Control Access

For deeper reference into the commands used, look at the Man pages of IPTABLES and IPTABLES-SAVE.

Leave a Reply

Your email address will not be published. Required fields are marked *