• 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



  • 相关阅读:
    虚拟机添加新磁盘挂载,导致以前的文件丢失解决办法
    python实现tab键自动补全
    设计模式
    js 深浅拷贝 笔记总结
    js 闭包
    flex 布局
    vue2.0 之 生命周期
    移动端适配 rem
    vue 之 双向绑定原理
    vue2.0 之 过渡动画transtion
  • 原文地址:https://www.cnblogs.com/lexus/p/1919166.html
Copyright © 2020-2023  润新知