linux poison RSS
linux poison Email
0

How to scan a host

You can use nmap to determine all the TCP/IP ports on which a remote server is listening. It isn’t usually an important tool in the home environment, but it can be used in a corporate environment to detect vulnerabilities in your network, such as servers running unauthorized network applications. It is a favorite tool of malicious surfers and therefore should be used to test external as well as internal servers under your control.

Here is an example of trying to do a scan using valid TCP connections (-sT) in the extremely slow “insane” mode (-T 5) from ports 1 to 5000.

# nmap -sT -T 5 -p 1-5000 192.168.1.153
Read more
0

How to use SPAM Blacklists (Public) With Sendmail

There are many publicly available lists of known open mail relay servers and spam generating mail servers on the Internet. Some are maintained by volunteers, others are managed by public companies

You can configure sendmail to use its dnsbl feature to both query these lists and reject the mail if a match is found. Here are some sample entries you can add to your /etc/sendmail.mc file; they should all be on one line.

FEATURE(`dnsbl', `ipwhois.rfc-ignorant.org',`"550 Mail from " $&{client_addr} " refused. Rejected for bad WHOIS info on IP of your SMTP server - see http://www.rfc-ignorant.org/“‘)
FEATURE(`dnsbl', `proxies.blackholes.easynet.nl', `"550 5.7.1 ACCESS DENIED to OPEN PROXY SERVER "$&{client_name}" by easynet.nl DNSBL  (http://proxies.blackholes.easynet.nl/errors.html)”‘, `’)dnl
FEATURE(`dnsbl', `relays.ordb.org', `"550 Email rejected due to sending server misconfiguration - see http://www.ordb.org/faq/#why_rejected“‘)dnl
FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} " refused - see http://spamcop.net/bl.shtml“‘)
FEATURE(`dnsbl',`sbl.spamhaus.org',`Rejected - see http://spamhaus.org/’)dnl

Be sure to visit the URLs listed to learn more about the individual services.

Read more
0

How to use procmail + spamassassin

The /etc/procmailrc file is used by procmail to determine the procmail helper programs that should be used to filter mail. This file isn’t created by default.

spamassassin has a template you can use called /etc/mail/spamassassin/spamassassin-spamc.rc. Copy the template to the /etc directory.

# cp /etc/mail/spamassassin/spamassassin-spamc.rc /etc/procmailrc
Read more
0

Setup Quotas

1) Enter Single user Mode:

# init 1

2) Edit your /etc/fstab file

The /etc/fstab file lists all the partitions that need to be auto-mounted when the system boots. Edit and add “usrquota” option to the partition that you want to have quota enable

LABEL=/home       /home          ext3    defaults,usrquota  1 2

3) Remount your partition

# mount -o remount /home

4) Come out of single user mode

# Exit

5) Create quota file

The uppermost directory of the filesystem needs to have an aquota.user file (defines quotas by user) and an aquota.group file (defines quotas by group), or both.

# touch /home/aquota.user

# chmod 600 /home/aquota.user

5) Initialize the user quota

# quotacheck -vagum

6) Edit the quota for a user

# edquota -u nikesh

The command will invoke the vi editor.

Disk quotas for user nikesh (uid 503):
Filesystem blocks soft hard inodes soft hard
/dev/hda3 24 0 0 7 0 0
Read more
1

Recover lost root password

1) Reboot your system.

2) When GRUB comes up type e .

3) Now select entry that begins with kernel.

4) Add then end of the kernel entry type either s or single, now hit enter.

5) Type b, the box will boot up and now you can type in the cmd prompt passwd root.

This will reset the password to whatever you like.

Read more
Related Posts with Thumbnails