Cable Connected

Is the cable connected to a live connection?

$ sudo ethtool eth0 | grep detected

ethtool is pretty handy for lots of stuff. It tells you pretty much everything that the kernel knows about the hardware’s status.

Setting Up Networking Manually

Activating an interface:

# /sbin/ifconfig eth0 192.168.44.1 netmask 255.255.255.0\
                  broadcast 192.168.44.255

Getting routing happy:

# /sbin/route add -net 192.168.44.0 netmask 255.255.255.0 dev eth0
# /sbin/route add default gw 192.168.44.4 dev eth0

Firewall

Old fashioned firewalls:

# /sbin/ipfwadm -F -p deny
# /sbin/ipfwadm -F -a m -S 192.168.44.0/24 -D 0.0.0.0/0

Or the newer fashioned firewall:

# /sbin/ipchains -P forward DENY
# /sbin/ipchains -A forward -j MASQ -s 192.168.44.0/24 -d 0.0.0.0/0
Note
These are very ancient notes. See iptables for the modern way to do firewalls.

Some good tidbits

  • Megsinet DNS = 208.150.60.2, 208.133.80.2, 208.133.80.8, 208.133.72.2

  • Cox DNS = 24.0.149.1

DNS and IP lookup:

$ nslookup 24.0.149.1
$ dnsquery xed.cx

Or to see how well DNS changes are propagating, check:

How about telneting in as root?- Yuck this topic is a big pain in the ass. A good place to start is:

# ls /dev/[tp]ty* > /etc/securetty

Ok, the follow up - In RH 6.2 (and maybe 6.1), add this to the top of

/etc/securetty:
0
1
2
3
4

That’s it. That should do the trick. What a pain!

iproute2

The package iproute2 (iproute in Red Hat ecosystems) can replace many older classic network configuration tools. It also provides for more sophisticated networking features like Quality Of Service and Traffic Control. Here are the utilities that come with the Gentoo iproute2 package:

  • /sbin/ip - Show and edit routing, devices, policy routing and tunnels.

    1. ip address show - like ifconfig

    2. ip link show - like ifconfig but just the links

    3. ip route show - like route.

    4. ip n[eighbor] show - like arp

    5. ip rule show -

  • /sbin/ss - Socket statistics.

  • /sbin/nstat - Network statistics tool.

  • /sbin/ifstat - Interface statistics tool.

  • /sbin/rtmon - Listens to and monitors RTnetlink.

  • /sbin/tc - Traffic control utility.

  • /sbin/rtacct - Statistics for real time? Realm?

  • /sbin/lnstat - Linux network statistics.

  • /sbin/ifcfg -?

  • /sbin/genl -?

  • /sbin/rtpr -?

  • /sbin/routel - List routes.

  • /sbin/routef - Flush routes.

Traffic Control

Ratelimiting a single host or netmask: http://lartc.org/howto/lartc.ratelimit.single.html

Red Hat rumored to have something called tc-config. Check on that.

To check on current traffic control situation:

tc (qdisc|class|filter) show dev $DEV