A wonderful Linux Q & A-network-related articles

Source: Internet
Author: User
Article title: a wonderful Q & A in Linux-network-related articles. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
0001 change apache's default character set to Chinese (bjchenxu)
If it is 1. *, vi httpd. conf
Find adddefadefacharset ISO8859-1 line, change to adddefacharcharset GB2312
If it is 2. *, you need to change the location, vi httpd. conf
Adddefadefacharset ISO-8859-1 changed to adddefadefacharset off
  
0002 permanent ip address change (bjchenxu)
Ifconfig eth0 New ip
Then edit/etc/sysconfig/network-scripts/ifcfg-eth0 and modify the ip
  
0003 remote display of Windows desktop (lnx3000) installation rdesktop package on Linux
  
0004 manually add the default gateway (bjchenxu)
Run "route add default gw gateway" as the root user to change the gateway IP address.
1 vi/etc/sysconfig/network-scripts/ifcfg-eth0
Change GATEWAY
2/etc/init. d/network restart
  
0005 redhat 8.0 on msn and qq (bjchenxu)
Download Gaim 0.58:
Gaim-0.58-2.i386.rpm
Download QQ plug-in for gcc2.9:
Libqq-0.0.3-ft-0.58-gcc296.so.gz
Put the downloaded file in the/temp directory, and then delete the existing Gaim in the system. that is, in the terminal simulator, type the command: rpm-e gaim.
Start Installation
Open the terminal simulator and run the following command to install Gaim 0.58:
Cd/temp (go to the temp directory)
Rpm-ivh gaim-0.58-2.i386.rpm (software installation)
After the installation is successful, you can create a Gaim icon on the GNOME or KDE desktop.
To continue to install the QQ plug-in, enter the following command:
Gunzip libqq-0.0.3-ft-0.58-gcc296.so.gz (extract files)
Cp libqq-0.0.3-ft-0.58-gcc296.so/usr/lib/gaim (copy the plug-in to the gaim Library Directory)
Software settings
The logon interface that appears when Gaim 0.85 is started for the first time. Select plug-in first, click load in the plug-in dialog box, load libmsn. so and libqq-0.0.3-ft-0.58-gcc296.so files respectively, confirm and close. Then select "all accounts" and click "add" in the account editor that appears. when the account modification page appears, we can enter our QQ or MSN number, enter the QQ number or MSN mailbox for the login name, enter the corresponding QQ or MSN password for the password, enter your nickname for Alias, select the corresponding QQ or MSN protocol, and set other settings to the default one. After all the settings are complete, you can log on and use them.
Due to frequent upgrades to the msn protocol by MS, the gaim and msn plug-ins on linux must be upgraded. Currently, there is no foolproof solution. sorry.
  
0006 find out the program running on port 22 (bjchenxu)
Lsof-I: 22
  
0007 view the local IP address, gateway, and dns (bjchenxu)
IP:
Log on as the root user and execute ifconfig. Here, eth0 is the first Nic, and lo is the default device Gateway:
Log on as a root user and run netstat-rn. the Gateway of the row starting with 0.0.0.0 is the default Gateway. you can also view the/etc/sysconfig/network file, which contains the specified address!
DNS:
More/etc/resolv. conf:
Nameserver 202.96.69.38
Nameserver 202.96.64.38
  
0008 run the RH8.0 command line to change the ping TTL value (cgweb, lnx)
Method 1 (valid after restart ):
# Sysctl-w net. ipv4.ip _ default_ttl = N
(N = 0 ~ 255). if N> 255, ttl = 0
Method 2 (invalid after restart ):
# Echo N (N is 0 ~ (255)>/proc/sys/net/ipv4/ip_default_ttl
  
0009 change the default system configuration value (houaq) in the RH8.0 command line)
Edit/etc/sysctl. conf. for example, set
Net. ipv4.ip _ forward = 0
Change
Net. ipv4.ip _ forward = 1
It takes effect after restart. use sysctl-a to view details.
  
0010 mount the directory shared by other windows machines on the LAN (bjchenxu)
Mount-t smbfs-o username = guest, password = guest // machine/path/mnt/cdrom
  
0011 allowed | prohibit root login via SSH (Fun-FreeBSD)
Modify sshd_config: PermitRootLogin no | yes
  
0012 allow root to directly telnet to log on (bjchenxu, platinum)
Method 1:
Edit/etc/pam. d/login and remove
Auth required/lib/security/pam_securetty.so
Method 2:
Vi/etc/securetty
Add
Pts/0
Pts/1
...
0013 connect to the adsl device in linux (wind521)
A Linux + at least one network card + broadband device that runs normally has been applied for and has been activated. There are several kinds of ADSL devices on the market, and there are some slight differences in the way they work.
The process of using virtual dialing to access the Internet, that is, using pppoe devices to perform virtual dialing is called an omnidirectional cat, which is a kind of automatic dialing after power-on, the interfaces left for us are RJ45, while the gateways left for us in Dalian are 10.0.0.2. this kind of device is the easiest to deal with, and finally it is to directly assign a fixed IP address to the user, relatively easy to deal
1. The first type requires dialing:
These devices communicate with computers through the eth interface, so connect the hardware devices first, especially those of broadband cats, be sure to confirm the correctness (otherwise it will not be my business if you do not do it later) and then start the system, check whether the rp-pppoe software is installed on the system (you can find it through rpm-qa | grep pppoe). If you are not installed, go down one on the CD or on the Internet, after the installation, run the adsl-setup command as the root user to enter the Configuration status of the adsl data, and enter the user name and other information for applying for broadband, accept until the end (it's all E files in it, but it's easy to understand at first glance. I usually don't need to configure a firewall. Select 0 for your consideration ).
After the configuration is complete, run the adsl-start command as the root user. the adsl dial-up will be launched normally. if you have any specific problems, let's take a look at what the log (/var/log/messages) tells you.
Stop adsl and execute adsl-stop (very simple)
2. the other two methods are easier to deal:
Omnidirectional cat: as long as you set the IP address of your network card to a 10-segment IP address, and then the Gateway points to the IP address of the omnidirectional cat (10.0.0.2), there is basically no major problem with the fixed IP address: just like configuring the local Nic, you can fill in the IP address, Gateway, and DNS according to the application.
  
0014 set the linux automatic synchronization time (shunz)
Vi/etc/crontab
Add the following sentence:
00 0 1 ** root rdate-s time.nist.gov
  
0015 linux online resources (bjchenxu)
Foreign
Http://lwn.net/
Http://www.tldp.org/
Http://www.yolinux.com/(flying-dance big pig)
Http://www.justlinux.com/
Http://www.linuxtoday.com/
Http://www.linuxquestions.org/
Http://www.fokus.gmd.de/linux/
Http://www.linux-tutorial.info/
Http://public.www.planetmirror.com/
Http://www.freebsdforums.org/forums/
Http://www.netfilter.org/documentation/
Http://www-106.ibm.com/developerworks/linux/
  
China
Http://www.fanqiang.com/
Http://www.linuxsir.com/
Http://www.chinaunix.net/
The http://www.linuxfans.org/(deadcat)
Http://www.linuxeden.com/
Http://www.linuxforum.net/
Http://www.linuxaid.com.cn/
Http://freesoft.online.sh.cn/
Http://www-900.ibm.com/developerWorks/cn/linux/index.shtml
Http://www.neweasier.com/software.html
Http://www.blueidea.com/bbs/archivecontent.asp? Id = 635906 (sqh)
The http://westlinux.ywzc.net/(onesun)
  
0016 change the sshd port (bjchenxu)
Add a line in/etc/ssh/sshd_config: Port 2222,/etc/init. d/sshd restart to restart the daemon process.
  
0017 change the telnet port (bjchenxu)
Change the port number 21 corresponding to telnet in the/etc/services file to the value you want, and restart the daemon process in/etc/init. d/xinetd restart.
  
0018 problems with the terminal mode (sakulagi)
Export TERM = vt100
  
0019 simulate a super terminal. in LINUX, what programs are connected to routers and switches (alstone)
Minicom
  
0020 automatic disconnection during ssh (wind521)
That is the timetou setting. modify the TMOUT variable value.
  
0021 what tools are used for Intrusion Detection (bjchenxu)
Snort
  
0022 Linux bjchenxu)
Both cchecker and efence databases are supported.
  
0023 how to monitor all data through the local Nic in linux (bjchenxu)
Tcpdump iptraf
  
0024 why does the root user say "command not found (bjchenxu)" when executing many commands)
You are using telnet, and then su is root. change the su command format to su-root.
  
0025 disable the POP3 permission of a user (tiansgx)
You can turn off the POP3 port. Find the pop-3 110/tcp line in the file/etc/services and add a # line before it. just comment it out.
  
0026 play flash animation (myxfc) in linux)
Playing flash animation in linux will not close the browser (other plug-ins are not easy to use)
First download the flash Player plug-in linux
Http://www.collaborium.org/onsite/jos2000/related/soft/flash_linux.tar.gz
Tar zxvf flash_linux.tar.gz
After opening the package, you will see the Linux folder
In the linux file cheek, there are two files libflashplayer. so and shockwaveflash. class. copy these two files to the plug-ins in your browser (different browsers may have different plug-ins in different locations)
/Usr/lib/mozilla-1.0.1/plugins, you can
  
0027 lock the wu-ftp user directory (wangla)
Edit the ftpaccess file
Restricted-uid *
This sentence is very important, which limits ftp users to be in their own directories.
  
0028 how can a server not allow teln?
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.