• Increase font size
  • Default font size
  • Decrease font size

Linux Commands

Unix and MacOS X /Windows/ cisco Display the current routing table

Unix and MacOS X

netstat -nr

Output from the same Linux machine with following IP addresses:
eth0 98.228.31.224/21
eth1 10.1.1.100/24
eth1:0 10.1.0.100/24
eth1:1 10.1.0.254/24

Linux% netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
98.228.24.0...

 

ntpdate - set the date and time via NTP (linux/unix)

 Namentpdate - set the date and time via NTP

Disclaimer: The functionality of this program is now available in the ntpd program. See the -q command line option in the ntpd - Network Time Protocol (NTP) daemon page. After a suitable period of mourning, the ntpdate program is to be retired from

this distributionSynopsis

ntpdate [ -46bBdqsuv ] [ -a key ] [ -e authdelay] [ -k keyfile ] [ -o version ] [ -p samples ] [ -t timeout ] [ -U user_name] server [ .....

 

Linux/Unix crontab syntax

 Setting up cron jobs in Unix and Solaris

cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris.  Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times.

This document covers following aspects of Unix cron jobs
1. Crontab Restrictions
2. Crontab Commands
3. Crontab file – syntax
4. Crontab...

 

IPTables Example Config --Only allowed access to certain ip address

#ipables Example Config --Only allowed access to certain ip address

# Firewall configuration written by system-config-securitylevel# Manual customization of this file is not recommended.# Firewall configuration written by system-config-securitylevel# Manual customization of this file is not recommended.*filter:INPUT ACCEPT [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]:RH-Firewall-1-INPUT - [0:0]-A INPUT -j RH-Firewall-1-INPUT-A FORWARD -j RH-Firewall-1-INPUT-A RH-Firewall-1-INPUT -i lo -j...

 

IPTables Example Config --- in Redhat AS 4

 #flush tables

/usr/sbin/iptables -F# DUMP/usr/sbin/iptables -N DUMP > /dev/null/usr/sbin/iptables -F DUMP/usr/sbin/iptables -A DUMP -p tcp -j LOG/usr/sbin/iptables -A DUMP -p udp -j LOG/usr/sbin/iptables -A DUMP -p tcp -j REJECT --reject-with tcp-reset/usr/sbin/iptables -A DUMP -p udp -j REJECT --reject-with icmp-port-unreachable/usr/sbin/iptables -A DUMP -j DROP# Stateful table/sbin/iptables -N STATEFUL > /dev/null/sbin/iptables -F STATEFUL/sbin/iptables -I STATEFUL -m state --state...

 
  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  3 
  •  4 
  •  5 
  •  6 
  •  7 
  •  8 
  •  9 
  •  10 
  •  Next 
  •  End 
  • »
Page 1 of 17

Login Form