config linux from command shell
#1
Posted 08 November 2006 - 12:08 PM
thank you.
have a nice day.
#2
Posted 08 November 2006 - 12:51 PM
From command line, try this guide to setting up a FC6 server (the link will take you to the Samba section; scroll down to the Firewall/SELinux section):
http://www.mjmwired....-fc6.html#samba
#3
Posted 08 November 2006 - 03:32 PM
First, some text editing. If you know how to use vi, you're set. If not, use nano. You open a file to edit by typing "nano <filename>" Commands are shown at the bottom. ^X is shorthand for CTRL+X
Edit /etc/sysconfig/system-config-securitylevel to add the following lines:
--port=137:udp --port=138:udp --port=139:tcp --port=445:tcpThese are entries the graphical tool Security Level uses, they don't really open the firewall.
In /etc/sysconfig/iptables add the following lines-
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPTThese are the actual firewall rules. You edited two files to keep the graphical tool AND the firewall rules in-sync.
Your firewall doesn't have the rules loaded, so type in:
/etc/init.d/iptables restartAnd hit enter. You should get four green OKs.
NOTE: Be really careful when editing files by hand if you're not used to Linux at the command line. If the above makes you nervous, I recommend hooking your monitor back up, and logging in locally. You can find a graphical admin tool at System --> Administration --> Security Level
Just enable the checkbox for Samba, and you should be set.
Edited by Dirk Chestnut, 08 November 2006 - 03:33 PM.
#4
Posted 09 November 2006 - 04:37 AM
Log in via SSH, switch to root and do the following-
First, some text editing. If you know how to use vi, you're set. If not, use nano. You open a file to edit by typing "nano <filename>" Commands are shown at the bottom. ^X is shorthand for CTRL+X
Edit /etc/sysconfig/system-config-securitylevel to add the following lines:--port=137:udp --port=138:udp --port=139:tcp --port=445:tcpThese are entries the graphical tool Security Level uses, they don't really open the firewall.
In /etc/sysconfig/iptables add the following lines--A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPTThese are the actual firewall rules. You edited two files to keep the graphical tool AND the firewall rules in-sync.
Your firewall doesn't have the rules loaded, so type in:/etc/init.d/iptables restartAnd hit enter. You should get four green OKs.
NOTE: Be really careful when editing files by hand if you're not used to Linux at the command line. If the above makes you nervous, I recommend hooking your monitor back up, and logging in locally. You can find a graphical admin tool at System --> Administration --> Security Level
Just enable the checkbox for Samba, and you should be set.
thanks mate, my little samba server is up and running!!!!!!!!!!! cheers
BinRev is hosted by the great people at Lunarpages!











