Nasser Heidari

2009-03-11

FreeBSD – Ssh Login Rejected : authentication error for illegal user

Filed under: freebsd,Linux — Nasser Heidari @ 07:17

sshd[1822]:error:pam:authentication error for illegal user

# egrep -i ‘allow|deny’ /etc/ssh/sshd_config

AllowUsers                  nasser@85.*

***my problem solved after that i comment this line in my sshd_config***

2009-02-15

Ignore portaudit – Install FreeBSD port even though portaudit reports vulnerability

Filed under: freebsd — Nasser Heidari @ 12:49

I don’t recommend u to do this , i just wanted to install mysql for testing purposes, it’s better to update your ports tree and install new version !

# cd /usr/ports/databases/mysql50-server

# make install clean && rehash

===>  mysql-server-5.0.67_1 has known vulnerabilities:
=> mysql — MyISAM table privileges security bypass vulnerability for symlinked paths.
Reference: <http://www.FreeBSD.org/ports/portaudit/738f8f9e-d661-11dd-a765-0030843d3802.html&gt;
=> Please update your ports tree and try again.
*** Error code 1

Stop in /usr/ports/databases/mysql50-server.

# make -DDISABLE_VULNERABILITIES install clean && rehash

2009-01-03

FreeBSD Memory Statistics

Filed under: freebsd — Nasser Heidari @ 09:23

# cd /usr/ports/sysutils/muse
# make install clean && rehash
# muse -m
Active:       44.953 MB
Inactive:    335.492 MB
Wired:       138.852 MB
Reserved:      2.797 MB
Cache:         6.094 MB
Kernel:        0.133 MB
Interrupt:     0.008 MB
Buffer:      112.188 MB

Total:      1999.109 MB
Free:       1472.758 MB

2008-12-30

How to spoof a MAC address !

Filed under: freebsd,Linux,Microsoft Windows — Nasser Heidari @ 20:06

Don’t rely on MAC filtering alone, however. Please, just don’t. It’s a bad idea. People seem to think “Oh, well, sure a determined attacker can get past it, but not anyone else.” It doesn’t take much determination at all to spoof a MAC address. In fact, I’ll tell you how:

  1. “Listen” in on network traffic. Pick out the MAC address. This can be done with a plethora of freely available security tools, including Nmap.
  2. Change your MAC address.

You can spoof a MAC address when using Nmap with nothing more than a –spoof-mac command line option for Nmap itself to hide the true source of Nmap probes. If you give it a MAC address argument of “0″, it will even generate a random MAC address for you.

For more general MAC address spoofing, your MAC address is trivially reset with tools available in default installs of most operating systems. Here are some examples:

  • Linux: ifconfig eth0 hw ether 03:a0:04:d3:00:11
  • FreeBSD: ifconfig bge0 link 03:a0:04:d3:00:11
  • MS Windows: On Microsoft Windows systems, the MAC address is stored in a registry key. The location of that key varies from one MS Windows version to the next, but find that and you can just edit it yourself. There are, of course, numerous free utilities you can download to make this change for you as well (such as Macshift for MS Windows XP).

Custom tcshrc

Filed under: freebsd — Nasser Heidari @ 09:05
Tags:

chsh -s /bin/tcsh
cd
cat >> .tcshrc
setenv  EDITOR  vi
setenv  PAGER   less
set prompt = “%{33[0;31m%}%p %{33[0;33m%}%n@%m:%{33[0;32m%}%~%#%{33[0m%} ”
set color
alias ls “ls-F”
setenv LSCOLORS ExGxCxDxCxEgDxAbAgdxAx

PRESS CTRL+D to save and Exit

2008-11-09

ipfw: install_state: Too many dynamic rules !

Filed under: freebsd — Nasser Heidari @ 13:08

today after installing bind on freebsd , and configuring ipfw , i kept reciveing this message :

ipfw: install_state: Too many dynamic rules

after a little googleing i found out the problem .

Problem solved after i change following sysctl value:

sysctl net.inet.ip.fw.dyn_max=16384

echo “sysctl net.inet.ip.fw.dyn_max=16384″ >> /etc/sysctl.conf

default value is 4096 .

2008-11-08

BIND 9 FreeBSD Installation

Filed under: freebsd — Nasser Heidari @ 16:51
Tags: ,

freebsd-logo

# cd /usr/ports/dns/bind95 && make install clean
# mkdir -p /var/chroot/named/etc/namedb/log
# mkdir -p /var/chroot/named/dev
# mkdir -p /var/chroot/named/var/run
# cd /var/chroot
# chown -R bind:bind named
# chmod 700 named
# cp /etc/localtime /var/chroot/named/etc
# cp /etc/namedb/named.root /var/chroot/named/etc/namedb/
# cd /var/chroot/named/dev
# mknod zero c 2 12
# ln -s /dev/random .
# mknod null c 2 2
# chmod 666 zero random null
# cd /etc
# mv namedb old.namedb
# ln -s /var/chroot/named/etc/namedb .
# rndc-confgen -a -c /etc/namedb/rndc.conf -k rndc-key -b 512
# vi /etc/rc.conf
named_enable="YES"
named_program="/usr/local/sbin/named"
named_chrootdir="/var/chroot/named"
named_flags="-c /etc/namedb/named.conf"
named_pidfile="/var/run/named.pid"

2008-05-29

using ippools in ipf – Solaris 10

Filed under: freebsd,Miscellaneous — Nasser Heidari @ 10:31
Tags: , ,

Solaris@root ~ # cat /etc/ipf/ippool.conf

table role = ipf type = tree number = 5
{ 192.168.18.0/24; 12.1.1.0/23 };

# ip range for local network
table role = ipf type = tree number = 10
{192.168.0.0/16; 172.16.0.0/16; 10.0.0.0/8; };

# ip range for XXX network
table role = ipf type = tree number = 12
{ 1.1.1.0/29; 2.2.2.0/21 };

Solaris@root ~ # cat /etc/ipf/ipf.conf

# Permit DNS Query

pass in quick on eri0 proto udp from pool/5 to 192.168.1.1/32 port = 53 keep state

pass in quick on eri0 proto udp from pool/12 to 192.168.1.1/32 port = 53 keep state

pass in quick on eri0 proto udp from pool/10 to 192.168.1.1/32 port = 53 keep state

« Previous Page

Create a free website or blog at WordPress.com.