tar cf file.tar files
– create a tar named file.tar containing files
tar xf file.tar
– extract the files from file.tar
tar czf file.tar.gz files
– create a tar with Gzip compression
tar xzf file.tar.gz
– extract a tar using Gzip
tar cjf file.tar.bz2
– create a tar with Bzip2 compression
tar xjf file.tar.bz2
– extract a tar using Bzip2
gzip file
– compresses file and renames it to file.gz
gzip -d file.gz
– decompresses file.gz back to file
Archive for February, 2010
There are repository rpm packages for RHEL4 and RHEL5 . The repository package installs the repo details on your local
system for yum or up2date to use. Then you can install packages with your usual method, and the EPEL repository is
included.
su -c 'rpm -Uvh http://mirror.nl.leaseweb.net/epel/5/i386/epel-release-5-4.noarch.rpm'
...
su -c 'yum install foo'
centos repo yum
[mysqld]
default-character-set=utf8
default-collation=utf8_general_ci
character-set-server=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
[client]
default-character-set=utf8
set all to utf8 in my.cnf
whois -h filtergen.level3.net RIPE::ASXXXX
1. Log in as root in SSH.
2. Type mysql -uadmin -p`cat /etc/psa/.psa.shadow`
, and then press Enter.
3. Type use psa;
, and then press Enter.
4. Type select * from sys_users;
, and then press Enter.
5. Type select * from accounts where id = 2;
, and then press Enter.
A table displays that shows the id, type, and password for accounts where the ID = 2.
sc.exe create testservice binPath= "C:\test.exe -k runservice" DisplayName= "testservice"
sc.exe delete testservice
10 Port Forwarding
By:
Stephen Carville
Rev:
08/23/02
Port Forwarding is also possible using OpenSSH (Sec 17.2).
10.1 Using xinetd redirect function
The simpliest and, in my opinion, the preferred way to handle redirecting unencrypted connections is to use the redirect
capability built into xinetd.
If necessary, add services names to /etc/services. For example:
geofwd 50005/tcp # GeoTrac forwarded port
1. Add service file to /etc/xinetd.d. Example file:
# default: on
# description: forward connections to indian:1005
service geofwd
{
flags = REUSE
socket_type = stream
wait = no
user = root
redirect = 192.168.124.4 1005
log_on_failure += USERID
}
2. Restart xinetd
# /etc/rc.d/init.d/xinetd restart
10.2 Using Netcat
The netcat utility is sometimes described as the ‘Swiss Army Knife” of the network. Here we are using it for very basic
port forwarding from an externally accessible server to an internal server. If it is not necessary to run the forwarding
service continiously, on Redhat it is prefereable to use xinetd forwarding.
1. Install netcat from CDROM or from ftp
# rpm -Uvh ftp://volga/pub/RPMS/nc-*.rpm
2. Add services names to /etc/services. For example:
geofwd 50005/tcp # GeoTrac forwarded port(netcat)
3. Add service file to /etc/xinetd.d. Example file:
4. # default: on
# description: forward connections to panama:1005
service geofwd
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/bin/nc
server_args = 192.168.124.38 1005
log_on_failure += USERID
}
5. Restart xinetd
# /etc/rc.d/init.d/xinetd restart
SELECT accounts.id, mail.mail_name, accounts.password, domains.name FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id
Hello again! I decided to stop making programming tutorials for a couple of days so in this tutorial you will learn how
to set up NAT Routing on Windows XP. Some of you know that some time ago I was working on a project in Visual Basic 6
that would do this thing. So, in Windows there is a tool that is used to manage network stuff like setting IP Addresses,
set up routing etc. This tool’s name is netsh (short for network shell). Using netsh you will need 2 NICs (Network
Interface Cards), one to connect to the public network(to the Internet) and the other to connect to the private
network(to other computers in LAN). So the network schema will look like this:
As we see, the machine that has 2 NICs will have routing enabled and will be the other client’s gateway. The clients
will connect to their gateway through a switch(if there will be only one client you can use a cross-over cable from
gateway’s private NIC to clients NIC).
Now HOW TO INSTALL IT?
First we open the Control Panel. If you are using the “Category View” to view icons first go to “Performance and
Maintenance” and then “Administrative Tools” otherwise go straight to the “Administrative Tools” then open
“Services”. On the list find “Routing and Remote Access”, double click on it and set the Startup type to
“Automatic” and click OK. Close the Services window and open the registry editor by going to Start > Run… and
typing “regedit” without the “ ”. Click OK and in the window expand to the following path: My Computer >
HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > Tcpip > Parameters. Now in the list you will see something
like “IPEnableRouter”. Double click on it and turn the value from 0 to 1. Now restart your computer.
You must know the names of your adapters you are using. For the tutorial we will use “Wireless Network Connection”
for the public NIC and “Local Area Connection” for the private NIC.
Now we open the command prompt and type the following command to install NAT:
Code:
netsh routing ip nat install
Now type the next command to add the public interface:
Code:
netsh routing ip nat add interface "Wireless Network Connection" full
And the last command to add the private interface:
Code:
netsh routing ip nat add interface "Local Area Connection" private
…and the installation is done!
What about the client’s IP addresses?
Oh yeah! Set an IP to the private NIC of the machine that is doing routing and the clients will use that IP as their
default gateway. The client’s IP addresses must be the same subnet as the gateways. Your public NIC’s IP doesn’t
need to be changed!
Heres an example of an IP configuration:
As you see the public NIC’s IP address on the routing machine is not the same subnet as the private NIC’s IP
address. So be careful, the mustn’t be!
I hope you will find this thread useful and save some money buying routers. If you want to set up a wireless router then
check the tutorials session later because I’ll be talking about creating ad-hoc wireless networks on Windows XP.
PS: I’m sorry if you don’t like my computers on the schemes, I’ve drawn them in Paint, lol
Best wishes,
Dren
http://kb.parallels.com/en/1473 -> How to use tcpdump to catch xml-rpc requests sent from/to POA to/from external
systems
http://kb.parallels.com/en/2261 -> Clustered qmail tasks are stuck in running state forever, email services do not work
properly
http://kb.parallels.com/en/5476 -> LDAP server is not responding, database looks corrupted.
http://kb.parallels.com/en/1877 -> How do I test spamassasin delete or mark ability on qmail host?