linode 配置私有ip for pptp

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



posted on 2010-12-28 22:24  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2010/12/28/1919166.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值