惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
The GitHub Blog
The GitHub Blog
Vercel News
Vercel News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
F
Fortinet All Blogs
Jina AI
Jina AI
I
InfoQ
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
G
Google Developers Blog
V
Visual Studio Blog
L
LangChain Blog
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
T
Tor Project blog
GbyAI
GbyAI
MongoDB | Blog
MongoDB | Blog
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
Recorded Future
Recorded Future
N
News and Events Feed by Topic
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
O
OpenAI News
Google DeepMind News
Google DeepMind News
S
Schneier on Security
C
Check Point Blog
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
T
Tenable Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
Cyberwarzone
Cyberwarzone
月光博客
月光博客
The Last Watchdog
The Last Watchdog
B
Blog
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
T
Tailwind CSS Blog
Hacker News: Ask HN
Hacker News: Ask HN
H
Heimdal Security Blog
美团技术团队

博客园 - 可可

广东电信最新DNS更新了 分布式缓存失效处理 序列化 suse中计划任务工具cron的使用 转载《.NET框架设计之五------------异常设计(异常与返回值)》 《高级Bash脚本编程指南》在线阅读 转载《Linux Shell Bash 各种小技巧》 Linux多线程例子 SuSE下chkconfig的启动脚本参考例子"/etc/init.d/skeleton” - 可可 - 博客园 转载《Starting and Stoping Services: insserv》 linux下c++程序编译错误--理解typename 一个公网IP情况下实现LVS VS/DR vmware中suse10不能上网解决方法 Using PHP with mod_fcgid Apache Configuration PHP在Apache中两种工作方式的区别(CGI模式、Apache 模块DLL) SSO 转贴《负载均衡技术介绍》 CDN
转载《Adding a Second IP Address to an Existing Network Adapter on Linux》
可可 · 2009-05-23 · via 博客园 - 可可

 

  http://www.oclc.org/asiapacific/zhcn/support/documentation/ezproxy/technote/2l.htm

Adding a Second IP Address to an Existing Network Adapter on Linux

If you run EZproxy on a Linux system that already has a web server and you want to use EZproxy on port 80, you will need to assign an additional DNS name and IP address to the server.

Start by requesting the new DNS name and IP address from your network administrator. The IP address you request must be in the same subnet as the existing IP address on your server. If you will be using proxy by hostname.

In this note, the DNS name ezproxy.yourlib.org and the IP address 24.249.162.195 demonstrate where the DNS name and IP address should appear, and where you should insert your values instead.

If you use proxy by hostname, be sure to request the creation of the wildcard entry to point to the same address. With proxy by hostname, you should also verify that the DNS entries with the Check DNS test.

Add an IP address for Non-SUSE distributions

These are the steps to add the second IP address to your existing network adapter under non-SUSE distributions of Linux.

  1. Become root on your system, either by logging into that account or using the su command.
  2. Change your current directory to the /etc/sysconfig/network-scripts directory with the command:
    cd /etc/sysconfig/network-scripts (在suse10上应该是/etc/sysconfig/network/)
  3. Check for existing network adapters with the command:
    ls ifcfg-*
    In most instances, you will see the files ifcfg-eth0 and ifcfg-lo. If you see other files with any other names and are unfamiliar with configuring TCP/IP, you may want to consult with your system administrator before proceeding or contact support@oclc.org.
  4. Edit /etc/hosts and add a line for your new address and name such as:
    24.249.162.195 ezproxy.yourlib.org
  5. To create the new interface, you will copy ifcfg-eth0 to ifcfg-eth0:0 with the command:
    cp ifcfg-eth0 ifcfg-eth0:0
    Next, edit icfg-eth0:0 and change the DEVICE line to be similar to:
    DEVICE=eth0:0
    and change the IPADDR line to be similiar to:
    IPADDR=24.249.162.195
  6. To activate the new IP address, issue a command similar to:
    ./ifup eth0:0

Add an IP address for SUSE distributions

These are the steps to add the second IP address to your existing network adapter under SUSE distributions of Linux.

  1. Become root on your system, either by logging into that account or using the su command.
  2. Change your current directory to the /etc/sysconfig/network-scripts directory with the command:
    cd /etc/sysconfig/network-scripts
  3. Check for existing network adapters with the command:

    ls ifcfg-eth*

    and look for a file named similar to ifcfg-eth-id-12:34:56:78:90:ab. The colon-delimited letters and digits at the end are the MAC address (hardware address) of the Ethernet adapter.

  4. Edit /etc/hosts and add a line for your new address and name such as:
    24.249.162.195 ezproxy.yourlib.org
  5. To create the new interface, you will edit ifcfg-eth-id-12:34:56:78:90:ab. The file should contain lines similar to:

    BOOTPROTO='static'
    BROADCAST='24.249.162.255'
    IPADDR='24.249.162.194'
    NETMASK='255.255.255.0'
    NETWORK='24.249.162.0'
    STARTMODE='onboot'
    USERCONTROL='no'
    _nm_name='bus-pci-0000:01:04.0'

    and will contain additional lines. At the bottom of this file, you should add lines similar to:

    IPADDR1='24.249.162.195'
    NETMASK1='255.255.255.0'
    LABEL1='0'

    to add the extra address and then you should issue:

    /etc/init.d/network restart

    to restart networking and activate the new IP address.

Reconfigure EZproxy to use a specific IP address

To tell EZproxy to use this name and address, edit config.txt/ezproxy.cfg and add lines similar to:

Name ezproxy.yourlib.org
Interface 24.249.162.195

These lines should appear before any LoginPort, LoginPortSSL, or Title lines.

Reconfigure Apache to use a specific IP address

You will also need to configure your existing web server to tell it to use only its IP address. In Apache, you do this by editing httpd.conf and changing your Listen lines like:

Listen 80

to

Listen 24.249.162.194:80

where 24.249.162.194 would be replaced by the main IP address of your server.