热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

linode配置私有ipforpptp

http:library.linode.comnetworkingconfiguring-static-ip-interfaces#debian__amp__ubuntusudovi
http://library.linode.com/networking/configuring-static-ip-interfaces/#debian__amp__ubuntu
sudo vi /etc/network/interfaces


auto lo
iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp

#auto eth0 eth0:0 eth0:1
auto eth0 eth0:0

# eth0 - This is the main IP address that will be used for most outbound connections.
# The address, netmask and gateway are all necessary.
iface eth0 inet static
 address 74.207.245.31
 netmask 255.255.255.0
 gateway 74.207.245.1



# eth0:0 - Private IPs have no gateway (they are not publicly routable) so all you need to
# specify is the address and netmask.
iface eth0:0 inet static
 address 192.168.153.213
 netmask 255.255.128.0

sudo /etc/init.d/networking restart
ping 192.168.153.213
ping boy38girl.com



Debian & Ubuntu

Since Ubuntu is based on Debian, their configuration is the same. The relevant file to edit is /etc/network/interfaces - the file syntax is fairly straightforward, but you can read the comments in the file for more details about what each line does.

In the example below, change the IP addresses to reflect the values shown under the "Remote Access" tab of the Linode Manager.

File: /etc/network/interfaces

# The loopback interface auto lo iface lo inet loopback  # Configuration for eth0 and aliases  # This line ensures that the interface will be brought up during boot. auto eth0 eth0:0 eth0:1  # eth0 - This is the main IP address that will be used for most outbound connections. # The address, netmask and gateway are all necessary. iface eth0 inet static address 12.34.56.78 netmask 255.255.255.0 gateway 12.34.56.1  # eth0:0 # This is a second public IP address. iface eth0:0 inet static address 34.56.78.90 netmask 255.255.255.0  # eth0:1 - Private IPs have no gateway (they are not publicly routable) so all you need to # specify is the address and netmask. iface eth0:1 inet static address 192.168.133.234 netmask 255.255.128.0 

Restart networking:

/etc/init.d/networking restart 

From the Linode, ping each of the default gateways listed on the "Remote Access" tab of the Linode Manager:

ping 12.34.56.1 ping 98.76.54.1




推荐阅读
author-avatar
33
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有