Linux IP Setting Tips

xiaoxiao2021-03-06  38

How to implement IP camouflage? I now have a Linux host to connect to the Internet through the DDN line, have their own IP and domain name, and also with 20 95 workstations via HUB, I can achieve these 20 95 workstations through IP camouflage Simultaneous Internet? Simple IP Masq is very simple. If you use 2.0.x and 2.1.xx core, in the premise of supporting IP Forward and IP Masq within the core, the last plus in / etc / ppp / if-up A sentence (assuming your private network address is 192.168.xx): / sbin / ipfwadm -f -am -s 192.168.0.0/16 -d 0.0.0.0/0 If I use 2.1.10X, IPFWADM cannot Used, changed to Ipchains, method: / sbin / ipchains -a forward -j masq -s 192.168.0.0/16 then let the default gateway of all hosts on your LAN points to this Masq Linux The machine is OK, ipchains need to download another, see

Www.linuxhq.com/kpatch21.html

If the client is Win95, set it in DHCP. Of course, each client's DNS wants to point to the ISP DNS, or simple point, open a Cache Only and Forward Only DNS server on the Masq machine. Row. If your DNS is already getting, it is also very simple to use Squid, the default configuration file /etc/squid.conf can work (may need to change the port number of HTTP to 8080), and you can implement Cache function, use The effect is very simple. Step 1: Set your PPP to ensure that you can access the Internet on Linux box. Step 2: Run Squid -z to establish a cache directory? Step 3: If you need, modify /etc/squid.conf, the default is quite good, can be changed, change, change HTTP_Port from 3128 to 8080 In this way, everything is ready. When you need to internet, turn on the PPP, run Squid & You have a very good proxy, the client sets good proxy, optimistic. If you upgrade the PPPD to 2.3.5, you can configure it as "Dial-Dial", then match the ISDN, and the special line is estimated to have no difference. Default Gateway: 192.168.0.1 (Linux Box) IP Masq: (Linux Box) DEFAULT ROUTER: ABCD / SBIN / IPFWADM -F -AM -S 192.168.0.0/16 -D 0.0.0.0.0 or / sbin / ipchains A forward -j masq -s 192.168.0.0/16 squid: No setting, run. I wish you good luck. Here 192.168 ... just an example, replace it into your own address range. The default gateway of the server is of course a router! The default gateway of other machines must be a server (Linux box). Two network cards are installed on the Linux server, one piece picks up the internal network, give a retention address, another direct address such as 192.168, another direct address And the router picks up, use your official address so you only need two legal IPs. Doing safety should be better. If you do that router, use Linux to take a line to router, you only need one Legal IP. However, this method will slowly try again, how to use Lunux to implement NAT, ie, only apply to a limited IP, but have multiple people access the Internet, how to use LiUX implementation? Two ways 1. Proxy (ie Squid or Other proxy). 2. IPMasq Squid If you only have http, ftp, use 1, redhat5.1 with Squid RPM, quite good match

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

New Post(0)