Linux problem with a word (network)

xiaoxiao2021-03-06  18

--------------------------------------------- ------- 0001 Let Apache's default character set to Chinese (bjchenxi) vi httpd.conf, find adddefaultcharset ISO-8859-1 a line Apache version If it is 1. *, change to adddefaultcharset GB2312 if it is 2. * Change to AddDefaultCharset Off and then run /etc/init.d/httpd restart to restart Apache to take effect. 0002 Permanently change IP (BJCHENXU) ifconfig eth0 new IP then edits / etc / sysconfig / network-scripts / ifcfg-eth0, modify IP 0003 remotely display Windows desktop remotely (LNX3000) to install RDESKTOP packet 0004 Manually add default gateway (bjchenxu) With root users, execution: Route Add Default GW Gateway IP want to change the gateway 1 Vi / etc / sysconfig / network-scripts / ifcfg-eth0 Changing 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 / temp directory, Then delete the GAIM in the system, that is, type commands in the terminal emulator: rpm -e gaim. Start installing the open terminal emulator, continue to perform the following command to install the GAIM version 0.58, namely: CD / TEMP (enter the temp directory) RPM -IVH GAIM-0.58-2.i386.rpm (installation software) When the installation is successful, you can Establish a GAIM icon on the GNOME or KDE desktop. Continue to install QQ plug-in, type command: gunzip libqq-0.0.3-ft-0.58-gcc296.so.gz (decompress file) CP libqq-0.0.3-ft-0.58-gcc296.so / usr / lib / gaim (Copy plug-in to the GAIM library directory) The Software Settings When the GAIM version 0.85 is first launched, the login interface will appear. First select "Plug-in", click "Load" in the Plugin dialog box, load libmsn.so and libqq-0.0.3-ft-0.58-gcc296.so file, and turn it off after confirmation. Then select "All Accounts", continue to click "Add" in the account editor that appears, when you appear, we can enter your QQ or MSN number, login name fill in the QQ number or MSN mailbox. The password fills in the corresponding QQ or MSN password, Alias ​​fill in its own nickname, the protocol selects the corresponding QQ or MSN, and other settings can be default. You can log in when all settings are complete. Since MS is often upgraded to MSN's protocol, the GAIM and MSN plugins on Linux must be upgraded, and there is no no longer-lost solution, please forgive 0006 Isors 22-port now run what program (bjchenxu) LSOF -I: 22 0007 Viewbook IP, Gateway, DNS (BJCHENXU) IP: Log in with root, executes ifconfig.

Where ETH0 is the first network card, LO is the default device Gateway: Log in to the root user, execute netstat -rn, the Gateway, which is starting with 0.0.0.0, is the default gateway, you can also view the / etc / sysconfig / network file, inside Have a specified address! DNS: more /etc/resolv.conf, the content is specified as follows: Nameserver 202.96.69.38 Nameserver 202.96.64.38 0008 RH8.0 Command Line Change the TTL value (CGWeb, LNX) method 1 (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 Open Linux IP Forward (Houaq) Edit /etc/sysctl.conf, for example, change net.ipv4.ip_forward = 0 to NET.IPV4.IP_FORWARD = 1, take effect, use sysctl -a to seek 0010 Mount LAN Other Windows Machine Shared Directory (BJCHENXU) mount -t smbfs -o username = guest, password = guest // machine / path / mnt / cdrom 0011 Allow | Prohibition of root is modified by SSH login (FUN-FreeBSD) Sshd_config: permitrootlogin no | yes 0012 Let root direct Telnet (BJCHENXU, Platinum) Method 1: Edit / Etc/pam.d/login, remove auth request /lib/security/pam_securetty.so This sentence 2: VI / ETC / securetty Add PTS / 0 PTS / 1 ... 0013 In Linux ADSL device (Wind521) Need a normal Linux at least one network card broadband device has been applied, and has been opened. At present, there are a few ADSL equipment on the market, and their way to work has some subtle differences.

It is the process of completing the Internet through virtual dialing, that is, using the PPPoE device to perform virtual dial-up calls, it is an automatic dial-up work after power-on, then left to our interface is RJ45. The gateway that is generally left to our Dalian area is 10.0.0.2. This device is most likely to deal with. Finally, it is directly assigned to a fixed IP, which is relatively easy to deal with it. 1. The first need is dialing: Several devices communicate with the computer via the ETH interface, so the connection of the hardware device is first, especially the broadband cat, must confirm the correctness (otherwise, don't go anything in a while, don't just count, you don't think about me) and start the system, Confirm that the software is installed on the system (to find the user via rpm -qa | grep pppoe), if the user is not installed, in the disc or go online to Down, after installing, perform ADSL with root users Setup, this enters the setting status of ADSL data, requires input to apply for broadband usernames and other information, confirm that there is no problem, accept until the end (inside is E text, but can understand, simple, I usually don't have to use a firewall setting, I can choose 0, everyone can consider). After the configuration is complete, the ADSL-START is executed with root users, which will make ADSL's dial-up work, will be online, if there is any specific problem, look at the log (/ var / log / messages) tells you what.

Stop ADSL, execute ADSL-STOP (very simple) 2. The other two are easier to deal with: full-to-day cat: Just set your network card to an IP of a 10 network segment, then the gateway refers to the whole gateway To the IP of the cat, on (10.0.0.2), basically no too much problem fixed IP: Like the NIC configuration, the IP, gateway, and DNS can be fixed by the application. 0014 Let Linux automatic synchronization time (shunz) VI / etc / crontab plus a sentence: 00 0 1 * * root rdate -s time.nist.gov 0015 Linux online resources What are the online resources? Http://lwn.net/ http://www.tldp.org/ http://www.yolinux.com/(Flying-Dance Big 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/ domestic http://www.fanqiang.com/ http: / / www.linuxsir.com/ http://www.chinaunix.net/ 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.bluei Dea.com/bbs/archiveContent.asp?id=635906 (SQH) http://westlinux.ywzc.net/(Onesun) 0016 Change SSHD port (bjchenxu) Add a line in / etc / ssh / sshd_config: Port 2222 , / Etc / init.d / sshd restart Restart Triggering Process 0017 Change the Telnet port (bjchenxu) Change the port number 21 of the Telnet in the / etc / service file to the value you want, / etc / init.d / xinetd RESTART Restart Triggering Process 0018 Terminal Mode has a problem (Sakulagi) Export Term = VT100 0019 mimics super terminal, Linux What program connection router and switches (Alstone) Minicom 0020 SSH can not automatically disconnect (Wind521, double eyelid pig) Modify the.bash_profile file under his home directory, plus export tmout =

10,000 (in seconds) and run Source .Bash_profile 0021 What tool is used to make intrusion detection (BJCHENXU) Snort 0022 Linux Under Detector memory leakage tool (BJCHENXU) CChecker or EFENCE Co can 0023 Linux How to monitor all through this Net card data (BJCHENXU) TCPDUMP or IPTRAF 0024 Why is the root performing a lot of commands say command not found (bjchenxu). You are telnet, then SU ​​is root, change your su command format, should be Su - root 0025 Close the user's POP3 permissions (tiansgx) can turn the port of POP3. Find this line POP-3 110 / TCP in the file / etc / services to add this line to the '#', you can comment out. 0026 Linux Play Flash Animation (MYXFC) LINUX Play Flash Animation With this thing, it will not cause the browser to close (other plugin is not easy to use) first download flash play animation at Linux plugin 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, there are two files libflashplayer.so and shockwaveflash.class, These two files are copied into the plugin in your browser (the browser is different, the position of the plugin may be different) /usr/lib/mozilla-1.0.1/plugins, you can lock the WU-FTP user in 0027 Directory Edit FTPAccess file restricted-uid * This sentence is important to limit FTP users in their own directory. 0028 While the server does not allow Telnet (Know Qiuyi) server to start the Telnet service && server's firewall priority should be set to low 0029 to prevent anyone from using the su command to become root (xiaohu0) 1.vi /etc/pam.d/ Su Auth Sufficient /LIB/Security/pam_rootok.so Debug Auth Required /Lib/security/pam_wheel.so group = Wheel 2. In / etc / pam. D / su configuration file defined WHEEL group. 0030 How to make Lynx browser can browse Chinese website (Ghost_Vale) Simplified Chinese web browsing modify the following settings on the Save options to disk: [X] Display and Character set Display character set: (!) [Chinese________________________] Assumed document character set: [iso-8859-1 ______] CJK Mode (!): [ON_] Then moved to the bottom ACCEPT CHANGES Press ENTER to save, you can, of course your system is to support Simplified Chinese can 0031 network card is activated, but can't do it, what should I do? (Slock, double eyelids) Traceroute, see that it is hurting in that piece.

1.PING ourselves 3.PING DNS 4.Traceroute DNS If all normal nslookup www.sina.com.cn ping sina's Address TraceRoute sina's address is basically able to know the result 0032 in redhat9 Samba, Win2000 Can you access, Win98 is not accessible? (Squall2003) If it is a Wind98 required to modify the registry: hkey_local_machine / system / correntControlSet / Services / VXD / VNETSUP built a D value: EnablePlainTextPasswd, key value 1 0033 How to get the MAC address of the NIC (bjchenxu, hutueworm) ARP -A | awk '{Print $ 4}' IFCONFIG ETH0 | Head -1 | awk '{print $ 5}' 0034 How to get an IP address of the NIC (MB) ifconfig eth0 | awk '/ inet addr / {split ($ 2, x, ":") Print x [2]} '0035 How to modify the working group (hutueworm) vi /etc/samba/smba/smb.conf in the Linux machine, modify the Workgroup = one, write the group name behind. 0036 a piece of network card how to bind two IP (LinuxLoveu) #CD / etc / sysconfig / network-scripts #cp ifcfg-eth0 IFCFG-ETH0: 1 #VI ifcfg-eth0: 1 Modify IP and device name Debian Next network card binding ip plurality of methods (NetDC) modify / etc / network / interfaces auto eth0 iface eth0 inet static address 172.16.3.123 netmask 255.255.255.0 network 172.16.3.0 broadcast 172.16.3.255 gateway 172.16.3.1 auto eth0: 1 iface eth0: 1 inet Static Address 10.16.3.123 Netmask 255.255.0.0 Network 10.16.0.0 Broadcast 10.16.255.255 Modified / etc / network / ifstate LO = Lo Eth0 = Eth0 Eth0: 1 = Eth0: 1 Then /etc/init.d/networking restart is ok .

A NIC Bind Multi IP Another Method Creates a file in / etc / sysconfig / network-scripts / down: ifcfg-ethx-rangex ("x" is the network card number) file content: ipaddr_start = ipaddr_end = Clonenum = 0 can have 256 IP 0037 an IP how to bind two network cards (HUTUWORM) assumptions 192.168.0.88 is IP, 192.168.0.1 is gateway: / sbin / modprobe bonding miimon = 100 mod = 1 / Sbin / ifdown eth1 / sbin / ifdown eth1 / sbin / ifconfig bond0 192.168.0.88 / sbin / ifenslave bond0 Eth0 Eth1 / Sbin / Route Add Default GW 192.168.0.1 0038 192.168.1.0/24 (double eyelid pig) It is 192.168. 1.0 / 255.255.255.0 is equivalent, but it means that the way is different ... 0039 Linux Clear ARP table command (NETDC) #arp -d -a (suitable for BSD) for host in `ARP | SED '/ Address / d '| awk' {print $ 1} '`; do arp -d $ host; done 0040 Using NTP protocol from server Synchronization Time (NTDC) NTPDATE NTP-Server Example: NTPDATE 172.16.2.1 0041 Host Command Usage (bjchenxu) Host can use to query domain names, but also get more information host -t mx example.com can query the MX record of Example.com, and the name Host -l Example.com that handles Mail Host Host -l Example.com will return all registrations The domain name host -a example.com under Example.com will display all domain information of this host. 0042 immediately let Linux support NAT (Platinum) Echo 1> / proc / sys / net / ipv4 / ip_forward iptables -t nat -i POSTROUTING -J Masquerade 0043 RH8.0 RCP Usage Setup (ZHQH1) Just take effect on the root user, build the .rhosts file in both part of the root user root directory, and add the HostName of the two sides. The other party's IP and HostName 2 should be added to the two / etc / hosts files. The service is started, and the redhat is not started by default. Method: Use the email to use the space bar before the RSH option is selected, determine exit. Then execute: Service Xinetd Restart. 3, go to the /etc/pam.d/ directory, use "#" to block the auth request /lib/security/pam_securetty.so in the RSH file.

0044 On the ETHX device, the Linux supports network broadcast function (PLATINUM) IP Route Add 255.255.255.255 Dev Ethx 0045 Routing Setting Manual (NETDC) View Routing Information: Netstat -Rn Route -n Handmade Routing: Route Add -Net 192.168.0.0 Netmask 255.255.255.0 GW 172.16.0.1 Manually deleted a routing: Route del -Net 192.168.0.0 Netmask 255.255.255.0 GW 172.16.0.1 Good, here is important, let the system start Automatically enable routing settings. Add a route to redhat, modify file / etc / sysconfig / static-routes any net 192.168.0.0 netmask 255.255.255.0 GW 172.16.0.1 Add a route in Debian, method 1: Modify / etc / network / interface code: auto eth0 iface eth0 inet static address 172.16.3.222 netmask 255.255.0.0 network 172.16.0.0 broadcast 172.16.255.255 gateway 172.16.2.1 up route add -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1 down route del -net 192.168.0.0 netmask 255.255.255.0 GW 172.16.0.1 Method 2: Create a simple script file in the /etc/neetwork/if-up.d directory, such as static-route $ (remember to end with the symbol, do not have a Run-Parts meeting Run out to tell you something is the simplest, such as: code: #! / Bin / bash route add -net 192.168.0.0 Netmask 255.255.0.0 Netmask 255.25.0.1 嘿嘿, you can also guess / etc / Other directories in the network / directory. I have found that this Route's setting in Debian is actually a relatively simple application of its configuration files, you can do more complex applications.

转载请注明原文地址:https://www.9cbs.com/read-63432.html

New Post(0)