*scratch*

It is not a diary the most people have rather a *scratch* Emacs buffer. It keeps notes about everything related to Linux, Open Source, UNIX, MacOSX and software engineering.

Friday, July 15, 2005

 

CUPS tips

Change CUPS printer options:

lpoptions -p lp1 -o media=A4

List all options:

lpoptions -p lp1 -l

Very quick introduction at CUPS intro.

Friday, July 01, 2005

 

interface config on MacOSX

How to make an alias to existing ethernet interface:

ifconfig en0 inet 10.0.0.1 netmask 255.255.255.0 alias
# if IP address is not in the same network then ...
route add -host 10.0.0.1 -interface 127.0.0.1

Make ip forwarding:

sysctl -w net.inet.ip.forwarding=1
natd -interface en0

Set firewall rules:

ipfw 10001 add divert natd all from 10.0.0.1 to any via en0
ipfw 10002 add pass all from any to any via 10.0.0.1
# 10001/10002 are rule numbers, check current list of rules with :
ipfw list

Archives

December 2004   January 2005   February 2005   March 2005   May 2005   July 2005   October 2005   January 2006   March 2006   May 2006   July 2006   December 2006   January 2007   February 2007   May 2007   July 2007   November 2007   January 2008   February 2008   July 2008   August 2008   September 2008   November 2008   April 2009  

This page is powered by Blogger. Isn't yours?