I have a set of command notes for general and version specific LEAF
use. I am thinking this could be a useful addition to the LEAF FAQ's.
I would appreciate any thoughts, suggestions, and/or corrections!
********************** START OF FAQ ************************************
##################################
######## LEAF COMMAND FAQ ########
##################################
This section is a short reference of the iproute2 commands and other
tidbits of information that are commonly asked for by LEAF users. These
may save you a little time.
IP COMMANDS -
-{ifconfig/route comparable commands}
---------------------------------------------------
#ip address show
- {ifconfig}
#ip address add 1.2.3.4/24 broadcast 1.2.3.4 dev eth0 up
- {ifconfig(options) eth0 up}
#ip link set dev eth0 up
- {ifconfig eth0 up}
#ip route show
- {route -n}
#ip route add default via 1.2.3.4
- {route add gw -net 1.2.3.4}
#ip way
- {arp -a -n}
#ip route add nat 1.2.3.4/8 via 192.168.1.10 table (-f inet)
#ip route add 192.168.0.0/24 via 192.168.0.1 dev eth0 [static route]
LOGS
#/var/log/syslog
#/var/log/messages
ADDING MORE MODULES
# mount -t msdos /dev/fd0 /mnt
# cp /mnt/(module_name) /lib/modules
# umount /mnt (or) umount msdos /mnt
START FORWARDING (ROUTING)
*NOTE* This should be automatically done with LEAF, this is FYI!
#echo "1" > /proc/sys/net/ipv4/ip_forward
MY COMMON NIC SETUPS
#3c5x9 - set io=300,320 irq=10,11 with 3c5x9cfg DOS utility
#ne io=300 - also load the "8390" module
#smc-ultra io=300 irq=10
DUPLEX SETTINGS
# half-duplex for connections to Cable/DSL Modems and hubs. (default)
# full-duples for NIC-to-NIC, router, and most switch connections.
########################################################
######## EIGERSTEIN/DACHSTEIN SPECIFIC COMMANDS ########
########################################################
# Start the lrp configuration applet
lrcfg
The network script will bring up or down any network card:
# svi network
Usage: network start|stop|reload
network ifup|ifdown|ifreset eth0|eth1|eth2|all
network ipfilter load|flush|reload
network ipfilter list [input|output|forward|autofw|mfw|portfw]
network ipfilter list masq|masquerade
You can also use the net command
# net
Usage: net start|stop|reload
net ifup|ifdown|ifreset eth0|eth1|eth2|all
net ipfilter load|flush|reload
net ipfilter list [input|output|forward|autofw|mfw|portfw]
net ipfilter list masq|masquerade
# Additional useful network commands
ifcfg eth0 1.2.3.4/24
netstat -i
netstat -r
# DHCP client "dhclient"
# editor "e3" in ae-mode (vi, pico, and others are on the disk).
# Network configuration file "/etc/network.conf".
# Firewall/Filtering is built-in (/etc/ipfilter.conf) on the stock
(default) image.
# lrpkg -i <packagename>
*NOTE* Also add to syslinux.cfg or lrpkg.cfg on your boot device
to load at boot.
# SILENT_DENY OPTION IN DACHSTEIN
# To set the SILENT_DENY (no logging) option to Dachstein Firewall.
# SILENT_DENY="ProtoNumber_SourceAddress/Netmask_DestinationPort"
# Netmask and DestinationPort are optional
*note*-the netmask and destination port# are optional
ProtoNumber will take "tcp", "udp", and "all" for options.
examples:
SILENT_DENY="tcp_a.b.c.d/255.255.255.255" (for all ports tcp-only)
SILENT_DENY="all_a.b.c.d_80 (for single port)
FIREWALL RUNNING RFC PRIVATE CLASS ADDRESS ON WAN CONNECTION
# edit /etc/ipfilter.conf and comment out the applied line of the
function:
# #A function to filter out martian source addesses
stop martians () {
#RFC 1918/1617/1597 blocks
$IPCH -A $LIST -j DENY -p all -s 10.0.0.0/8 -d 0/0 -l $*
$IPCH -A $LIST -j DENY -p all -s 192.168.0.0/24 -d 0/0 -l $*
#then have it take effect with "svi network reload".
#########################################
######## OXYGEN SPECIFIC COMMANDS #######
#########################################
Simply put, backing up can be done one of several ways:
# cd /tmp
# apkg -c etc
# bpkg etc
This way has full checking for space constraints and so forth.
# apkg -b etc
This way is quick and dirty, and does NOT check free space. Be
careful with this one - don't use this to back up the root.lrp
package! (especially if you are doing development!)
# apkg -ba
This is a quick and dirty way to back up "everything" - really,
it backs up every package found on the disk in the boot drive.
Options "-ba" will back up all packages except log.lrp, and "-be"
will back up the works.
# Adding new packages
Copy it to the disk (in linux, windows, DOS, etc...)
Reboot and Oxygen will auto-detect and add them.
# Network commands (functions)
svi network (start|stop|restart)
svi network ipfilter (load|reload|flush|list)
# DHCP client "dhcpcd"
# editor "e3" in vi-mode
# Network configuration file "/etc/network.conf"
# Firewall/Filtering is not on the stock (default) image.
#######################################################
######## BERING/LEAF-2.4.16 SPECIFIC COMMANDS ########
#######################################################
# Start the configuration menu
lrcfg
# lrpkg -i <packagename>
*NOTE* Also add to syslinux.cfg or lrpkg.cfg on your boot device
to load at boot.
# "ifconfig" is on disk in addition to iproute2 commands.
# Setting status of interfaces (network cards, modems, etc...)
ifup [options] [interface(s)
ifdown [options] [interface(s)]
[options]
(start|restart|stop|reload|force-reload)
# Network commands (functions)
svi networking (start|stop|reload|restart)
# DHCP client "pump"
# editor "e3" in ae-mode (vi, pico, and other modes available)
# Network configuration file "/etc/interfaces"
# Firewall/Filtering done by Shorewall (shorwall)
********************************* END OF FAQ ***********************
--
~Lynn Avants
aka Guitarlynn
guitarlynn at users.sourceforge.net
http://leaf.sourceforge.net
If linux isn't the answer, you've probably got the wrong question!
_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel