Пример /etc/network/interfaces в Debian
iface eth0 inet static address <IP_ADDR> netmask 255.255.255.255 gateway <GW_IP_ADDR> pointopoint <GW_IP_ADDR>
Можно через ifconfig
ifconfig eth0 inet <local_ip> netmask 255.255.255.255 pointopoint <destination_ip> ip route add default via <destination_ip>
В CentOS чуть сложнее
- /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 HWADDR=<MAC address> ONBOOT=yes BOOTPROTO=static SCOPE="peer
" IPADDR=<IP_ADDR> NETMASK=255.255.255.255 - /etc/sysconfig/network-scripts/route-eth0
ADDRESS0=0.0.0.0 NETMASK0=0.0.0.0 GATEWAY0=<GW_IP_ADDR>