Skip to content

[U]biquitous [S]ystems project

Last semester I’ve registered myself for ubiquitous systems My project for the semester was CIT: City Issue Tracker. Take a closer look at it by watching the demo below.


iptables rules 4 samba sharing

Hello all!
Today i’m sharing a set of rules to setup an iptables firewall on a linux box (fedora) for samba.
If you ever have setup a samba daemon on your network you probably also thought about security accessing it, bellow you can see a set of rules for samba/share/access on your local network:

  1. start by accessing

    with your favourite editor as root.

  2. add the following set of rules to the file
    # samba stuff
    -A INPUT -p tcp -s --dport 139 -j ACCEPT
    -A INPUT -p udp -s --dport 139 -j ACCEPT
    -A INPUT -p udp -s --dport 138 -j ACCEPT
    -A INPUT -p tcp -s 0/0 --dport 139 -j DROP
    -A INPUT -p udp -s 0/0 --dport 139 -j DROP
    -A INPUT -p udp -s 0/0 --dport 138 -j DROP
    -A INPUT -p udp -s 0/0 --dport 137 -j DROP
    -A OUTPUT -p tcp -s --dport 139 -j ACCEPT
    -A OUTPUT -p udp -s --dport 139 -j ACCEPT
    -A OUTPUT -p udp -s --dport 138 -j ACCEPT
  4. restart iptables by doing:
    /etc/init.d/iptables restart

    and you are done.

Change to match your own network.

Hello world!

Well here we are! Another blog on the air.
Keep visiting here. Although you may sometimes feel disappointed!