I have been trying to get samba up and runnning but smbstatus basically tells me there are no shares.
I cannot ping my server and am concerned this is an issue. I can access my windows computer from the linux box though so I am not sure if this is actually an issue.
do I need Lisa running? (I don't even know what that is!)
I have read other thread where people get the same message from smbstatus but it always comes down to not being able to ping and the firewall stopping the econnection.
As I said I can ping all computers from any other computer except the linux computer which is 192.168.0.1
here is the output from smbstaus and my smb.conf file and iptables file.
[root@Shihan /]# smbstatus
Samba version 2.2.6pre2
Service uid gid pid machine
----------------------------------------------
Failed to open byte range locking database
ERROR: Failed to initialise locking database
Can't initialise locking module - exiting
smb.conf file:
#======================= Global Settings =====================================
[global]
workgroup = workgroup
netbios name = shihan
server string = Samba Server %v
guest account = pcguest
security = share
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 IPTOS_LOWDELAY
interfaces = 192.168.0.1
wins support = yes
#============================ Share Definitions ==============================
[share]
comment = Shared folder on shihan
path = /share
read only = no
public = yes
guest ok = yes
guest only = yes
[websites]
comment = websites
path = /home/web/htdocs
public = yes
writable = yes
iptables file:
#!/bin/sh
# Diable forwarding
echo 0 > /proc/sys/net/ipv4/ip_forward
LAN_IP_NET='192.168.0.1/24'
LAN_NIC='eth1'
WAN_IP='10.0.0.1'
WAN_NIC='eth0'
FORWARD_IP='192.168.0.1'
#WAS FORWARD_IP='192.168.0.3'
# load some modules (if needed)
# Flush
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
# enable Masquerade and forwarding
iptables -t nat -A POSTROUTING -s $LAN_IP_NET -j MASQUERADE
iptables -A FORWARD -j ACCEPT -i $LAN_NIC -s $LAN_IP_NET
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# Open ports on router for server/services
iptables -A INPUT -j ACCEPT -p tcp --dport 80
iptables -A INPUT -j ACCEPT -p tcp --dport 110
iptables -A INPUT -j ACCEPT -p tcp --dport 25
iptables -A INPUT -j ACCEPT -p tcp --dport 22
iptables -A INPUT -j ACCEPT -p tcp --dport 21
#added by Me from web info to allow pinging
iptables -I INPUT -s 192.168.0.1 -p tcp --dport 1241 -j ACCEPT
iptables -I INPUT -s 192.168.0.3 -p tcp --dport 1241 -j ACCEPT
iptables -I INPUT -s 192.168.0.2 -p tcp --dport 1241 -j ACCEPT
# STATE RELATED for router
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Open ports to server on LAN
#iptables -A FORWARD -j ACCEPT -p tcp --dport 80
#iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 192.168.0.3:80
# Enable forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
One other thing I will post here is the script I use to start the firewall. I ahve suspicions that it is not right. I have had to use the stop directive to start it! and start seemed only to give me the message "usage..."
#!/bin/sh
#!/bin/sh
#
# chkconfig: 2345 11 89
#
# description: Loads the rc.firewall-2.4 ruleset.
#
# processname: firewall-2.4
# pidfile: /var/run/firewall.pid
# config: /etc/rc.d/rc.firewall-2.4
# probe: true
# ----------------------------------------------------------------------------
# v05/24/03
#
# Part of the copyrighted and trademarked TrinityOS document.
#
http://www.ecst.csuchico.edu/~dranch
#
# Written and Maintained by David A. Ranch
#
dranch@trinnet.net
#
# Updates
# -------
# 05/24/03 - removed a old networking up check that had some
# improper SGML ampersand conversions.
# ----------------------------------------------------------------------------
# Source function library.
. /etc/rc.d/init.d/functions
# Check that networking is up.
[ "XXXX${NETWORKING}" = "XXXXno" ] && exit 0
[ -x /sbin/ifconfig ] || exit 0
# The location of various iptables and other shell programs
#
# If your Linux distribution came with a copy of iptables, most
# likely it is located in /sbin. If you manually compiled
# iptables, the default location is in /usr/local/sbin
#
# ** Please use the "whereis iptables" command to figure out
# ** where your copy is and change the path below to reflect
# ** your setup
#
IPTABLES=/usr/local/sbin/iptables
# See how we were called.
case "$1" in
start)
#I had comented out the following line to stop the usage message coming up DK
/etc/rc.d/rc.firewall-2.4
;;
stop)
echo -e "\nFlushing firewall and setting default policies to DROP\n"
$IPTABLES -P INPUT DROP
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT DROP
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -F -t nat
# Delete all User-specified chains
$IPTABLES -X
#
# Reset all IPTABLES counters
$IPTABLES -Z
;;
restart)
$0 stop
$0 start
;;
status)
$IPTABLES -L
;;
mlist)
cat /proc/net/ip_conntrack
;;
*)
echo "Usage: firewall-2.4 {start|stop|status|mlist}"
exit 1
esac
exit 0
echo -e "\nDone.\n"