Rabu, 29 Agustus 2007

URPMI Usage

To install packages on your Mandrake system, you use the urpmi command. The urpmi command will install the requested package(s) along with any dependencies they may require. There are many options that can be used with the urpmi command, I’ll start with a couple examples using the most common options, to give you an idea on the syntax used, and then list all the options. Keep in mind that urpmi is a root command and needs to be run as the root user.
The most common use of urpmi is installing a single package. An example of this is as follows:
Code:
[root@box root]# urpmi mozilla-firefox
The above command will install mozilla-firefox and any dependencies it may require.
You can also install multiple packages at a time by using the following:
Code:
[root@box root]# urpmi mozilla-firefox mozilla-thunderbird gcal
The above command would install those 3 packages and any dependencies required by them.
Another commonly used urpmi command is for updating every package on the system and is as follows:
Code:
[root@box root]# urpmi –auto-select –auto
As you can see, combining options is allowed.
The following are other options that can be used with the urpmi command:
-a With this option, if multiple packages are found matching the request, urpmi will install all of them.
–allow-force When using this option, if an error occurs, urpmi will ask the user if it should continue the installation without checking dependencies. This is not advised and is why urpmi’s default is to exit immediately.
–auto This option allows urpmi to install all required dependencies without stopping and asking if it’s ok to do so. Often used in combination with the –auto-select option.
–auto-select This option looks at your installed packages, looks at what is available in your defined media sources, and then updates any packages that it finds a newer version for.
–best-output This option will cause urpmi to try and use the X interface, if not available, the standard text (cli) interface is used (using rpm-like output).
–bug directory This option creates a bug report and puts it in directory. You have to send a compressed archive of the directory to the urpmi maintainer for the bug to be reported and accepted properly.
–clean This option clears the cache of any rpm’s there. The cache is located in /var/cache/urpmi/rpms
–curl This option causes urpmi to use curl to download the package(s). Using curl is the default.
–env directory Use a different environment directly from a bug report to replay a bug. The directory argument is the as given to the –bug option.
–excludedocs This option will cause the document files to not be installed.
–excludemedia media1,…,mediaN This option causes urpmi not to look at the specified media source(s).
–excludepath string This option will cause urpmi to not install files whose name begins with the defined string.
–force Using this option causes urpmi to assume yes on all questions.
–fuzzy This option will propose all packages partially matching the name given, even if one of the packages matches the given name exactly. (This is the same as -y).
–install-src This installs only the source package (no binary packages will be installed). Note: From what I can tell this option is no longer valid due to mandrake mirrors no longer being setup for urpmi use with the SRPM tree.
–keep With this option, if some dependancies cannot be satisfied, it’ll change the selection of packages in an attempt to keep the existing packages instead of removing them. This generally rejects the upgrade of packages when a dependency error occurs.
–limit-rate rate This option tries to limit the download speed. The rate is given in butes/sec. By default, this option is not active.
–media media1,…,mediaN With this option, urpmi will only look at the specified media for the package(s). Default is to look in all media sources.
–noclean This option causes the downloaded rpm’s to not be removed from the cache directory /var/cache/urpmi/rpms. Default is to remove downloaded/installed rpm’s from cache.
–no-uninstall This option causes urpmi to never ask to uninstall a package, instead it simply aborts. This can be safer in auto mode.
-p This option allows urpmi to search in provides to find a package. This is the default behavior.
-P This option does not allow urpmi to search in provides to find a package. (This is the opposite of the -p option).
–parallel alias This option activates distributed execution of urpmi to other machines. The other machines MUST have urpmi installed on them, but they are not required to have any media sources defined on them. the alias defines which extension module is to be used by urpmi (urpmi-parallel-ka-run or urpmi-parallel-ssh are available) and which machines should be updated. The alias is defined in the file /etc/urpmi/parallel.cfg
–proxy proxyhost[:port1080] Use this option if you need to specify HTTP proxy.
–proxy-user user:password Use this option to specify a user and password for proxy authentication.
-q This option causes quiet mode. When calling rpm no upgrade status will be displayed.
–root directory With this, all operations and scripts will run after chroot(2) and use the file system tree rooted to for rpm install. The rpm database that resides in the rooted tree will be used, but the urpmi configuration from the normal system tree will be used.
-s This option is the same as –src.
–sort-media media1,..mediaN With this option, you specify the order in which media sources should be sorted and looked at by urpmi.
–split-length count This option will split urpmi’s operation into small transactions of at least count packages. The default setting is 1. Setting this to 0 disables splitting into small transactions.
–split-level number This option will split urpmi’s operation into small transactions when the total number of packages to upgrade is greater than the given number. This option is activated by default with a value of 20.
–src name This option will search a source package matching the given name and select all of its dependencies by default, unless –install-src is used in order to install the source package itself. Note: From what I can tell this option is no longer valid due to mandrake mirrors no longer being setup for urpmi use with the SRPM tree.
–synthesis file This option will use the specified file instead of the urpmi database to use in searching for packages and resolving dependencies.
–test This option will cause urpmi to ‘test’ the installation of package(s) but not install the package(s) or modify the system in any way.
–update This option causes urpmi to only look for package(s) and resolve dependencies using media source(s) defined as update source(s). This was defined when adding the media source(s).
-v This option causes urpmi to be more verbose in its output.
–verify-rpm This option will activate or deactivate rpm signature checking. By default this is activated.
–wget By default is used by urpmi for downloading, this option allows you to specify that wget is used instead of curl.
-X This option causes urpmi to use the X interface, meaning it will open a gui window in the X environment.
-y This option is the same as the –fuzzy option.
–update This option causes urpmi to look for the requested package(s) only in the media source defined as an update source.
Other methods of using urpmi
urpmi http://www.some.url/filename.rpm This command will allow you to retrieve and install a rpm from a web site. Dependency resolving will still take place.
urpmi some.filename.rpm This command allows you to install an rpm that you have previously downloaded. You must run the command in the same directory as the rpm file. Dependency resolving still takes place.

Jumat, 24 Agustus 2007

Load Balancing

With NAT and policy routing, with working HTTPS, IM and large downloads

Quick Start for Impatient

Configuration export from the gateway router:


/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local comment="" \
disabled=no
add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=wlan2 \
comment="" disabled=no
add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=wlan1 \
comment="" disabled=no
/ ip firewall mangle
add chain=prerouting in-interface=Local connection-state=new nth=1,1,0 \
action=mark-connection new-connection-mark=odd passthrough=yes comment="" \
disabled=no
add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \
new-routing-mark=odd passthrough=no comment="" disabled=no
add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 \
action=mark-connection new-connection-mark=even passthrough=yes comment="" \
disabled=no
add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \
new-routing-mark=even passthrough=no comment="" disabled=no
/ ip firewall nat
add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
to-ports=0-65535 comment="" disabled=no
add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
to-ports=0-65535 comment="" disabled=no
/ ip route
add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \
comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 comment="" \
disabled=no

Senin, 06 Agustus 2007

Port Filter Mikrotik

/ ip firewall filteradd chain=forward protocol=tcp dst-port=135-139 action=drop comment=”” disabled=no

add chain=forward protocol=udp dst-port=135-139 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=445 action=drop comment=”” disabled=no

add chain=forward protocol=udp dst-port=445 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=593 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=1024-1030 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=1080 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=1214 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=1363 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=1364 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=1368 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=1373 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=1377 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=1433-1434 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=2745 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=2283 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=2535 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=3127 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=3410 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=4444 action=drop comment=”” disabled=no

add chain=forward protocol=udp dst-port=4444 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=5554 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=8866 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=10000 action=drop comment=” disabled=no

add chain=forward protocol=tcp dst-port=10080 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=12345 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=17300 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=27374 action=drop comment=”” disabled=no

add chain=forward protocol=tcp dst-port=65506 action=drop comment=”” disabled=no

MikroTik RouterOS™

MikroTik RouterOS™ turns a standard PC computer into a powerful network router. Just add standard network PC interfaces to expand the router capabilities.
  • Remote control with easy real-time Windows application (WinBox)
  • Telnet/SSH/console/serial console control with RADIUS authentication
  • Advanced bandwidth control
  • Network firewall with packet-filtering, masquerading, network address translation, logging and connection monitoring
  • DHCP support
  • HotSpot gateway with RADIUS authentication
  • Ethernet 10/100/1000Mb/s
  • Wireless client and Access Point 2.4GHz 11Mb/s (IEEE802.11b), 5GHz 54Mb/s (IEEE802.11a) and 2.4GHz 54Mb/s (IEEE802.11g) with RADIUS authentication for AP
  • V.35 synchronous 8.448Mb/s with Sync-PPP, HDLC or Frame Relay
  • X.21 synchronous 8.448Mb/s with Sync-PPP, HDLC or Frame Relay
  • Async PPP (up to 128 ports) with RADIUS authetication for modem pools
  • E1/T1 support
  • IP Telephony Gateway
  • Built-in Web-proxy
  • And much more
  • Sabtu, 04 Agustus 2007

    Google Adsense Page Positioning

    Kenneth Elliott

    Correct positioning of your Google adsense ads can make or break your success with the Google adsense program. Why is this true? Some studies suggest that eye positioning on website gravitate to particular sections of web pages. And if you don’t have the necessary ads in these positions you will not get the clicks.

    I talked to countless people that have great traffic, some with 300 to 1000 new visitors a day that say that they only make approx. at max $10 to $20 dollars a month on the adsense program. What a shame. But when I look at their websites the ads are either buried in wording that no one usually pays attention to or the ads are located in positions that just don’t call any attention to their presence.

    So were the best locations for you Google adsense ads. Well, I have found the number one best place for the ads are near or in proximity to your main menu. Why near your main menu. Because you know that visitors eyes will and always look for the menu structure of your website. So the common places for placement should be to the top right, the very top under your menu, or the top left. These are the most common locations for you main menu.

    But what about the color scheme of the Google adsense ads? Yes, color is very important. You have to make the ads looks as seamless as possible. Here is an example on one of my website http://www.pottery-barn-outlet.com. Here I decided to position the ads at the very top right under my main menu. In direct eye contact. Also, remove the borders; just these two changes will increase your adsense proceeds one hundred percent.

    By using these tactics I was able to increase my adsense click through rate significantly depending on traffic level and people’s interest.

    Take my advice and give it try. I believe you will see a change and hopefully make adsense a more pleasurable experience

    Jumat, 03 Agustus 2007

    Mikrotik Web Proxy Setting for Transparant proxy

    setting transparant web proxy server

    1. first se t web proxy
    / ip web-proxy
    set enabled=yes –>> to make ip web proxy enable
    set src-address=0.0.0.0 –>> to make source address to access web proxy will allow
    set port=8080 –>> to make port for web proxy
    set hostname=”proxy.war.net.id” –>> setting for visble hostname web proxy
    set transparent-proxy=yes –>> make transparant proxy enable
    set parent-proxy=0.0.0.0:0–>> if we used parent proxy x
    set cache-administrator=”support@somethink.org” –>> make set administrator info support
    set max-object-size=4096KiB –>> maximal object can cacth with the proxy server
    set cache-drive=system –>> where drive position that cache wil be saved
    set max-cache-size=unlimited –>> maximal harddrive we used for cache
    set max-ram-cache-size=unlimited –>> maximal ram we used for cache

    2. add nat for redirect port for squid to make transparant

    /ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080 –>> setting can redirect port 80 to 8080 for proxy server
    /ip firewall nat add chain=dstnat protocol=tcp dst-port=3128 action=redirect to-ports=8080 –>> setting can redirect port 3128 to 8080 for proxy server
    /ip firewall nat add chain=dstnat protocol=tcp dst-port=8080 action=redirect to-ports=8080 –>> setting can redirect port 8080 to 8080 for proxy server

    Kamis, 02 Agustus 2007

    MikroTik Wireless Configuration

    Setup uses Safe Mode. It means that all changes that are made during setup
    are reverted in case of error, or if Ctrl-C is used to abort setup. To keep
    changes exit setup using the ‘x’ key.
    [Safe Mode taken]

    Choose options by pressing one of the letters in the left column, before
    dash. Pressing ‘x’ will exit current menu, pressing Enter key will select the
    entry that is marked by an ‘*’. You can abort setup at any time by pressing
    Ctrl-C.

    Entries marked by ‘+’ are already configured.
    Entries marked by ‘-’ cannot be used yet.
    Entries marked by ‘X’ cannot be used without installing additional packages.
    r - reset all router configuration
    + l - load interface driver
    + a - configure ip address and gateway
    d - setup dhcp client
    + s - setup dhcp server
    p - setup pppoe client
    t - setup pptp client
    * x - exit menu
    your choice:
    OR
    [admin@MikroTik] > ip address
    [admin@MikroTik] ip address> add address=192.168.1.1/24 interface=ether1
    [admin@MikroTik] ip address> pr
    # ADDRESS NETWORK BROADCAST INTERFACE
    0 192.168.1.1/24 192.168.1.0 192.168.1.255 ether1
    admin@MikroTik] ip address> /
    [admin@MikroTik] >
    [admin@MikroTik] >interface
    [admin@MikroTik] interface> pr
    Flags: X - disabled, D - dynamic, R - running
    # NAME TYPE RX-RATE TX-RATE MTU
    0 X ether1 ether 0 0 1500
    1 X wlan1 wlan 0 0 1500
    [admin@MikroTik] interface> enable 0
    [admin@MikroTik] interface> enable 1

    [admin@MikroTik] interface> pr
    Flags: X - disabled, D - dynamic, R - running
    # NAME TYPE RX-RATE TX-RATE MTU
    0 R ether1 ether 0 0 1500
    1 X wlan1 wlan 0 0 1500
    [admin@MikroTik] ip address>add address=172.1.2.1/30 interface=wlan1
    [admin@MikroTik] interface eoip>
    [admin@MikroTik] interface eoip>add name=eoip-tunnel1 remote-address=172.1.2.2 tunnel-id=1 disabled=no arp=enabled
    [admin@MikroTik] interface eoip>pr
    Flags: X - disabled, R - running
    0 R name=”eoip-tunnel1″ mtu=1500 mac-address=FE:FD:00:00:00:00 arp=enabled remote-address=172.1.2.2 tunnel-id=1
    [admin@MikroTik] interface eoip>..
    [admin@MikroTik] interface>
    [admin@MikroTik] interface> bridge
    [admin@MikroTik] interface bridge> add name=bridge1
    [admin@MikroTik] interface bridge>pr
    Flags: X - disabled, R - running
    0 R name=”bridge1″ mtu=1500 arp=enabled mac-address=00:00:00:00:00:0 forward-protocols=ip,arp,appletalk,ipx,ipv6,other stp=no priority=32768 ageing-time=5m forward-delay=15s garbage-collection-interval=4s hello-time=2s max-message-age=20s
    [admin@MikroTik] interface bridge>port
    [admin@MikroTik] interface bridge port>pr
    # INTERFACE BRIDGE PRIORITY PATH-COST
    0 ether1 none 128 10
    1 eoip-tunnel1 none 128 10
    2 wlan1 none 128 10
    [admin@MikroTik] interface bridge port>set eoip-tunnel1 bridge=bridge1
    [admin@MikroTik] interface bridge port>set ether1 bridge=bridge1
    [admin@MikroTik] interface bridge port>pr
    # INTERFACE BRIDGE PRIORITY PATH-COST
    0 ether1 bridge1 128 10
    1 eoip-tunnel1 bridge1 128 10
    3 wlan1 none 128 10
    [admin@MikroTik] interface bridge port>.. ..
    [admin@MikroTik] interface>wireless
    [admin@MikroTik] interface wireless>set wlan1 mode=bridge disable-running-check=no band=5ghz frequency=5180 ssid=test1
    Configurration For Mikrotik Station / Client
    [admin@MikroTik] interface eoip>add name=eoip-tunnel1 remote-address=172.1.2.1 tunnel-id=1 disabled=no arp=enabled
    [admin@MikroTik] interface wireless>set wlan1 mode=station disable-running-check=no band=5ghz frequency=5180 ssid=test1
    [admin@MikroTik] interface>pr
    Flags: X - disabled, D - dynamic, R - running
    # NAME TYPE RX-RATE TX-RATE MTU
    0 R ether1 ether 0 0 1500
    1 R bridge1 bridge 0 0 1500
    2 R eoip-tunnel1 eoip-tunnel 0 0 1500
    3 R wlan1 wlan 0 0 1500