Saturday, October 30, 2010

FreeBSD net.inet.ip Sysctls Explained


net.ip.portrange.*

The net.inet.ip.portrange.* sysctl variables control the port number ranges automatically bound to TCP and UDP sockets.

net.inet.ip.portrange.first, net.inet.ip.portrange.last

Use the default range of values, normally net.inet.ip.portrange.hifirst through net.inet.ip.portrange.hilast. This is adjustable.

net.inet.ip.portrange.hifirst, net.inet.ip.portrange.hilast

Use a high range of values

net.inet.ip.portrange.lowfirst, net.inet.ip.portrange.lowlast

Use a low range of ports, which are normally restricted to privileged processes on UNIX systems.

net.inet.ip.redirect

Enable sending IP redirects Allow (1) or disallow (0) send ICMP redirections when forwarding. This option is ignored unless the host is routing IP packets. Normally, this option should be enabled on all systems.

type: boolean, dafault: 1

net.inet.ip.ttl

The maximum time-to-live (hop count) value for an IP packet sourced by the system. This value applies to normal transport protocols, not to ICMP.

type: integer, dafault: 64

More net.inet.ip Sysctls are Explained here

Wednesday, October 20, 2010

How to clear dmesg output in FreeBSD, OpenBSD

Clearing Dmesg output in Freebsd is very easy.
Just type the below command:

Saturday, March 6, 2010

How to Enable or Permit Root Login via SSH

Follow the instructions below to enable root login via SSH.

1. Edit the file /etc/ssh/sshd_config
Find the line
#PermitRootLogin no
Now uncomment and Change the No to yes
Now the Line should look like this
PermitRootLogin yes 

2. Now restart SSH.

Monday, December 21, 2009

How to enable SSHD in FreeBSD

Actually you will be asked whether to enable SSH, during a Standard Installation of FreeBSD.

Now, if you need to enable SSH after an installation, open the file rc.conf and add the line ` sshd_enable="YES" `.
open the file
# vi /etc/rc.conf
Now add the below line to the file.
sshd_enable="YES"
Now start sshd.
# /etc/rc.d/sshd start 

Tuesday, December 8, 2009

How to display free disk space of drives (hard disk)

The df utility displays statistics about the amount of free disk space on the specified file system or on the file system of which file is a part. Values are displayed in 512-byte per block counts. If neither a file or a file system operand is specified, statistics for all mounted file systems are displayed.

Use df -h to see the output "Human-readable" output. Uses unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte.
 # df -h 
Example:
# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad4s1a 23G 2.8G 19G 13% /
devfs 1.0K 1.0K 0B 100% /dev
 

Labels

Labels