If you know the network and netmask of your subnet you can type this as root:
iptables -I INPUT -s <your_subnet_CIDR_goes_here> -j ACCEPT
This will allow any computer on your local subnet access to this server. Not just for Samba, but for all services. If you want to only allow Samba services you need to indicate the protocol (tcp or udp) and list the ports.
My recollection is that Samba listens on (both tcp and udp, so you will need two rules) ports 137, 138, 139, and 445.
So...
Code:
iptables -I INPUT -s <your_subnet_CIDR> -p tcp --dport 137:139 -j ACCEPT
iptables -I INPUT -s <your_subnet_CIDR> -p tcp --dport 445 -j ACCEPT
iptables -I INPUT -s <your_subnet_CIDR> -p udp --dport 137:139 -j ACCEPT
iptables -I INPUT -s <your_subnet_CIDR> -p ucp --dport 445 -j ACCEPT
Explanation:
"-I INPUT" means this rule is to be Inserted at the head of the rules controling INcoming packets destined for this machine
"-s <your_subnet_CIDR>" indicates packets with Source address inside your subnet
"-p tcp" means check the Protocol for TCP
"--dport 137:139" means check for Destination PORT 137 through 139
"-j ACCEPT" indicates what to do with packets meeting the above qualifications
Hope this helps.
Sincerely
Bill Jennings