国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
ubuntu 下一個網(wǎng)卡綁定2個ip

ubuntu 下一個網(wǎng)卡綁定2個ip

#vi /etc/network/interfaces
OR
$ sudo vi /etc/network/interfaces
Modify as follows:

auto eth0auto eth0:0auto eth0:1iface eth0 inet staticaddress 192.168.1.1netmask 255.255.255.248gateway 192.168.1.254iface eth0:0 inet staticaddress 192.168.1.2netmask 255.255.255.248gateway 192.168.1.254iface eth0:1 inet staticaddress 192.168.1.3netmask 255.255.255.248gateway 192.168.1.254# add rest of alias / binds below

Save and close the file.

Now restart networking, enter:
# /etc/init.d/networking restart
OR
$ sudo /etc/init.d/networking restart


ubuntu8.10上網(wǎng)配置問題解決辦法

2009-04-17 14:06

這是我在網(wǎng)上下載的 我是用這個方法弄好的 你可以嘗試一下 很感謝寫這個的作者

卸載 Gnome Network Manager:這是必須的一步,因為不卸載的話,不過你如何設置,重啟后都會被重置。這個就是Bug所在之處。

用下列命令卸載:

sudo update-rc.d -f NetworkManager remove

這會禁用并且卸載Gnome Network Manager應用程序。然后你需要重啟。

手動修改網(wǎng)絡配置:這步你需要手動編輯網(wǎng)絡配置文件。

手動修改網(wǎng)絡配置文件:

sudo gedit /etc/network/interfaces

加入(或者修改)下列行:

auto lo eth0
iface lo inet loopback
iface eth0 inet static
address 192.168.1.96 這里是你的IP
netmask 255.255.255.0
gateway 192.168.1.1

 

保存修改。

手動修改DNS配置文件:

sudo nano /etc/resolv.conf

加入(或者修改)下列行:

# Generated by NetworkManager
nameserver 192.168.1.1 //這里也是你的
nameserver 202.106.46.151

保存修改。

手動重啟網(wǎng)絡服務:

sudo /etc/init.d/networking restart 開機 不能連接的話 重啟一下 再執(zhí)行 ifconfig 看看 有連接沒有

返回結果如下:

*Reconfiguring network interfaces… [OK]

現(xiàn)在,你可以在終端里輸入ifconfig命令來查看你修改的結果。如果不對,你還需要重啟下。


ubuntu 雙網(wǎng)卡 上網(wǎng) 內(nèi)網(wǎng) 外網(wǎng)

資源:
網(wǎng)卡兩塊: eth0,eth1; 一個帶有web登錄服務器方式的靜態(tài)ip, ubuntu9.04.
目標: 實現(xiàn)eth0外網(wǎng),eth1內(nèi)網(wǎng).

參考:
============參考1==============

2009年08月30日 星期日 上午 01:43一 臺雙網(wǎng)卡電腦擁有兩個網(wǎng)關是不可能的,因為默認網(wǎng)關(default gateway)只能是一個。給服務器安裝兩塊網(wǎng)卡,分別設置不同的ip和網(wǎng)關(內(nèi)網(wǎng)和外網(wǎng)),外網(wǎng)的通過外網(wǎng)網(wǎng)卡來訪問,內(nèi)網(wǎng)的通過內(nèi)網(wǎng)網(wǎng)卡來訪問,似 乎實現(xiàn)起來很簡單,但有些問題,因為默認網(wǎng)關(default gateway)只能是一個!

解決的辦法就是:

1、將其中一塊網(wǎng)卡(如外網(wǎng))設置默認網(wǎng)關,另外一塊網(wǎng)卡eth1不設置網(wǎng)關

sudo vi /etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
post-up iptables-restore < /etc/iptables.up.rules

#the second eth1
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0

注意沒有為 eth1(內(nèi)部網(wǎng)絡) 設置 gateway.

2. (注意:對于ubuntu系統(tǒng),該步驟似乎可以省略) 輸入命令:route, 如果沒有下面一行:

192.168.0.0 * 255.255.255.0 U 0 0 0 eth1

就手工加上一條靜態(tài)路由,讓另一個網(wǎng)段(內(nèi)網(wǎng))的數(shù)據(jù)經(jīng)過第二個網(wǎng)卡。使用route命令,命令的范例如下

參考命令:
sudo route add -net 192.168.0.0 netmask 255.255.255.0 dev eth1(讓對192.168.0.0的訪問走eth1網(wǎng)卡,netmask 后面是子網(wǎng)掩碼)

如果想讓上面的命令在開機時運行,編輯下面的文件執(zhí)行上面的命令,把上面的命令加入文件exit 0之前

sudo vi /etc/rc.local
==================參考2================
作者: Automatic
因為公司的需要,現(xiàn)在又追加了一個網(wǎng)段A:10.4.1.*/16,而公司原有域為B:10.2.1.*/16,為了使兩個網(wǎng)段能夠通信,本文的目的就在Ubuntu下設置路由
使兩個網(wǎng)段可以互相通信。
1、ubuntu機器配置為雙網(wǎng)卡,分別連接兩個網(wǎng)段。
#router@proxy:/etc/network$ sudo vi interfaces
dd
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 10.2.1.216
netmask 255.255.0.0
network 10.2.0.0
broadcast 10.2.255.255
gateway 10.2.1.218
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 211.93.80.129 211.94.65.97 211.98.4.1
auto eth1
iface eth1 inet static
address 10.4.1.216
netmask 255.255.0.0
network 10.4.0.0
broadcast 10.4.255.255
gateway 10.4.1.10
dns-nameservers 211.93.80.129 211.94.65.97
iface dsl-provider inet ppp
provider dsl-provider
2、打開包轉發(fā)
編輯/etc/sysctl.conf

net.ipv4.ip_forward = 0
改成
net.ipv4.ip_forward = 1


=================參考3=============

Ubuntu linux 6.06server版
以下是系統(tǒng)在運行過程中的一些基本操作:
1、在默認情況下系統(tǒng)禁止遠程用戶使用root進行登錄,需用user普通用戶登錄之后再使用sudo su root 進行轉換,或是直接在$普通用戶模式下用sudo 進行直接操作
$sudo su root             //切換到root用戶界面
#passwd root             //root用戶進行修改密碼
#passwd powerport        //對powerport用戶進行修改密碼

2、系統(tǒng)啟動目錄的腳本放在       /etc/init.d/目錄下       同其它版本的linux有些區(qū)別有些放在/etc/rc.d/init.d/目錄下
/etc/init.d/networking start       //啟動網(wǎng)卡
/etc/init.d/networking stop       //停止網(wǎng)卡
/etc/init.d/networking restart       //重啟網(wǎng)卡

3、網(wǎng)卡的配置文件放置在/etc/network/interfaces可以直接用vi /etc/network/interfaces 進行修改IP,如下:(請根據(jù)具體的網(wǎng)絡環(huán)境進行設置)
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.10.71
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.225
nameserver 202.168.134.133 192.168.1.1
auto eth1
iface eth1 inet static
address 192.168.10.18
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.225
nameserver 202.168.134.133 192.168.1.1

=================參考4=============

現(xiàn)有雙網(wǎng)卡的ubuntu連接內(nèi)外兩個網(wǎng)

外網(wǎng)網(wǎng)卡eth0, 網(wǎng)段 192.168.63.0

內(nèi)網(wǎng)網(wǎng)卡eth1, 網(wǎng)段 10.147.9.0

目標,內(nèi)網(wǎng)其他設備如10.147.9.70可以訪問外網(wǎng)的設備如192.168.63.1

首先要設置雙網(wǎng)卡同時使用

$ sudo vim /etc/network/interfaces

內(nèi)容如下

auto lo

iface lo inet loopback

iface eth1 inet static
address 10.147.9.250
netmask 255.255.0.0
gateway 10.147.9.1

auto eth1

注,其中外網(wǎng)段似乎是在gnome里設的,所以沒有提及,具體有待研究。

此時內(nèi)外網(wǎng)基本聯(lián)通

在內(nèi)網(wǎng)其他設備如 10.147.9.70上邊增加一條臨時路由,重啟后失效

windows這樣設

route add 192.168.63.0 mask 255.255.255.0 10.147.9.250

如果是永久性設置

route add -p 192.168.63.0 mask 255.255.255.0 10.147.9.250

linux 臨時路由添加

route add -net 192.168.63.0 netmask 255.255.255.0 gateway 10.147.9.250

ubuntu 永久靜態(tài)路由添加

$sudo vim /etc/rc.local

route add -net 192.168.63.0 netmask 255.255.255.0 gateway 10.147.9.250

把上面這句加到exit 0 上邊就行

意思是說所有發(fā)往192.168.63這個網(wǎng)段的地址全部先發(fā)往10.147.9.250

而不是系統(tǒng)原來的默認網(wǎng)關10.147.9.1


從10.147.9.70 ping 10.147.9.250 通

從10.147.9.70 ping 192.168.63.50 (同意設備的外網(wǎng)卡地址) 通

從10.147.9.70 ping 192.168.63.1 外網(wǎng)網(wǎng)關 不通

從10.147.9.250 ping 10.147.9.70 通

從192.168.63.50 ping 192.168.63.1 通


參考了很多資料, 說iptables可以實驗網(wǎng)橋或路由的轉發(fā)功能

具體操作如下:

開啟ipv4的轉發(fā)功能

2個地方要改

$ sudo /etc/sysctl.conf

把下面這句的#號去掉

#net.ipv4.ip_forward=1

還有

$ sudo vim /proc/sys/net/ipv4/ip_forward

把0改成1

然后運行下列命令iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT

然后測試從10.147.9.70 ping 192.168.63.1通了,慶祝一下
還有個問題,就是關機以后不能保存設置,就是說再次開機要再次運行上邊4條命令
研究了一下午,終于搞定。
把上邊4條命令加到開機自動運行的腳本里面即可。
這也是Ubuntu的小竅門
$sudo vim /etc/rc.local
把上邊四條命令加到
exit 0 上邊就行
本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
ubuntu網(wǎng)絡配置
[求助]Ubuntu網(wǎng)絡設置
關于Ubuntu的ip設置
ubuntu16 網(wǎng)絡設置
ubuntu 16.04網(wǎng)卡找不到eth0
ubuntu網(wǎng)絡配置(桌面版和服務器版)
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服