如何設定同時連內網(eth)跟外網(wifi) - Linux

By Lily
at 2019-01-17T15:29
at 2019-01-17T15:29
Table of Contents
目前小的有台server環境如下:
unbuntu 18.04
有Wifi跟網路線連接
然後想做到以下功能,
一,內網走網路線,外網走wifi。
二,可以用其他內網的電腦透過ssh或是http連到這台server。
三,這台server連出去都透過外網去連。
現在情況是:
連接內網時需要設定proxy才能夠讓其他電腦連線或是連出去,
proxy設定方式是在/etc/environment內加入
export all_proxy="socks://10.110.11.12:8080/"
export http_proxy="http://10.110.11.12:8080/"
export https_proxy="http://10.110.11.12:8080/"
目前我同時連接內外網的時後用route -n輸出如下:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 600 0 0 wlp2s0
0.0.0.0 10.110.214.254 0.0.0.0 UG 20100 0 0 enx000
10.110.214.0 0.0.0.0 255.255.255.0 U 100 0 0 enx000
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enx000
192.168.0.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
此時會無法上網也無法連線到這台server
用sudo route delete default gw 192.168.0.1之後
可以連線也能讓其他電腦透過內網連入,
但目前這台電腦的對外連線就都是透過內網的proxy無法透過外網。
想問一下我要如何設定才能做到我要功能呢?
PS:我有試過sudo route delete default gw 10.110.214.254
不過當我server有設定proxy的時後外網是完全不能用的,
就算我只有連wifi也是一樣。
最後感謝看我問題的人,更感謝回答我問題的人,謝謝。
--
尋找理想中的房子~
--
unbuntu 18.04
有Wifi跟網路線連接
然後想做到以下功能,
一,內網走網路線,外網走wifi。
二,可以用其他內網的電腦透過ssh或是http連到這台server。
三,這台server連出去都透過外網去連。
現在情況是:
連接內網時需要設定proxy才能夠讓其他電腦連線或是連出去,
proxy設定方式是在/etc/environment內加入
export all_proxy="socks://10.110.11.12:8080/"
export http_proxy="http://10.110.11.12:8080/"
export https_proxy="http://10.110.11.12:8080/"
目前我同時連接內外網的時後用route -n輸出如下:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 600 0 0 wlp2s0
0.0.0.0 10.110.214.254 0.0.0.0 UG 20100 0 0 enx000
10.110.214.0 0.0.0.0 255.255.255.0 U 100 0 0 enx000
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enx000
192.168.0.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
此時會無法上網也無法連線到這台server
用sudo route delete default gw 192.168.0.1之後
可以連線也能讓其他電腦透過內網連入,
但目前這台電腦的對外連線就都是透過內網的proxy無法透過外網。
想問一下我要如何設定才能做到我要功能呢?
PS:我有試過sudo route delete default gw 10.110.214.254
不過當我server有設定proxy的時後外網是完全不能用的,
就算我只有連wifi也是一樣。
最後感謝看我問題的人,更感謝回答我問題的人,謝謝。
--
尋找理想中的房子~
--
Tags:
Linux
All Comments

By Necoo
at 2019-01-19T04:52
at 2019-01-19T04:52

By Edith
at 2019-01-20T10:41
at 2019-01-20T10:41

By Sandy
at 2019-01-21T20:18
at 2019-01-21T20:18

By Jack
at 2019-01-24T06:01
at 2019-01-24T06:01

By Jacob
at 2019-01-26T23:42
at 2019-01-26T23:42

By Dinah
at 2019-01-31T21:31
at 2019-01-31T21:31

By Jake
at 2019-02-05T08:12
at 2019-02-05T08:12

By Elizabeth
at 2019-02-07T02:53
at 2019-02-07T02:53

By Kumar
at 2019-02-10T00:55
at 2019-02-10T00:55

By Hedy
at 2019-02-14T02:10
at 2019-02-14T02:10

By Regina
at 2019-02-15T04:53
at 2019-02-15T04:53

By Madame
at 2019-02-16T15:19
at 2019-02-16T15:19

By Linda
at 2019-02-18T06:47
at 2019-02-18T06:47

By Frederic
at 2019-02-21T22:58
at 2019-02-21T22:58

By Irma
at 2019-02-25T01:35
at 2019-02-25T01:35

By Oscar
at 2019-02-28T09:50
at 2019-02-28T09:50

By Rebecca
at 2019-03-01T21:02
at 2019-03-01T21:02

By Anonymous
at 2019-03-03T15:11
at 2019-03-03T15:11

By Gilbert
at 2019-03-05T18:51
at 2019-03-05T18:51

By Regina
at 2019-03-08T17:52
at 2019-03-08T17:52

By James
at 2019-03-11T14:01
at 2019-03-11T14:01

By Eden
at 2019-03-11T17:32
at 2019-03-11T17:32

By Ida
at 2019-03-13T17:06
at 2019-03-13T17:06

By Jessica
at 2019-03-14T09:28
at 2019-03-14T09:28

By Connor
at 2019-03-15T10:27
at 2019-03-15T10:27

By Queena
at 2019-03-20T05:12
at 2019-03-20T05:12

By Edward Lewis
at 2019-03-24T10:55
at 2019-03-24T10:55

By Poppy
at 2019-03-27T16:15
at 2019-03-27T16:15

By Caroline
at 2019-03-31T15:22
at 2019-03-31T15:22

By Hedwig
at 2019-04-01T04:33
at 2019-04-01T04:33

By Hamiltion
at 2019-04-01T12:48
at 2019-04-01T12:48

By James
at 2019-04-04T12:00
at 2019-04-04T12:00

By Regina
at 2019-04-06T22:13
at 2019-04-06T22:13

By Carol
at 2019-04-08T21:11
at 2019-04-08T21:11

By Eartha
at 2019-04-12T01:42
at 2019-04-12T01:42

By Selena
at 2019-04-16T12:29
at 2019-04-16T12:29

By Emma
at 2019-04-21T09:50
at 2019-04-21T09:50

By Kelly
at 2019-04-22T22:37
at 2019-04-22T22:37

By Lily
at 2019-04-25T09:45
at 2019-04-25T09:45

By Belly
at 2019-04-29T16:00
at 2019-04-29T16:00

By Kama
at 2019-05-03T17:20
at 2019-05-03T17:20

By Connor
at 2019-05-04T07:18
at 2019-05-04T07:18
Related Posts
git branch 的問題

By Olivia
at 2019-01-15T20:58
at 2019-01-15T20:58
請問如何將 Nautilus 內的文件檔名加入換行

By Franklin
at 2019-01-15T15:30
at 2019-01-15T15:30
使用UNIX--Like來開發的作業系統

By Necoo
at 2019-01-15T12:44
at 2019-01-15T12:44
autofs沒辦法掛載

By Damian
at 2019-01-15T10:11
at 2019-01-15T10:11
kernel panic - not syncing attempted

By Lauren
at 2019-01-15T00:33
at 2019-01-15T00:33