[問題] ubuntu20.04 雙網卡 pppoe + 固定ip
各位前輩好
小弟我最近有個需求是想把一台電腦當proxy
申請了中華的pppoe加上 中嘉寬頻的固定ip
主機版的網卡接中華pppoe的線
PCIE的網卡接中嘉的線
eno1是主機版的網卡
enp4s0是pcie的tplink網卡
我在網路上查了一些文章自己試了很久還是搞不太懂
為什麼其中一個對外可以通另一個就會不能通?
想請教各位前輩有沒有什麼解決方法?
提供資訊如下
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eno1
168.95.98.254 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eno1
192.168.1.1 0.0.0.0 255.255.255.255 UH 100 0 0 eno1
204.205.229.0 0.0.0.0 255.255.255.0 U 0 0 0 enp4s0
204.205.229.101 0.0.0.0 255.255.255.255 UH 0 0 0 enp4s0
ifconfig
eno1: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
inet 192.168.1.104 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2001:b011:3800:1c1e:b62e:99ff:fe92:55 prefixlen 64 scopeid
0x0<global>
inet6 fe80::b62e:99ff:fe92:55 prefixlen 64 scopeid 0x20<link>
ether b4:2e:99:92:00:55 txqueuelen 1000 (Ethernet)
RX packets 115409 bytes 10948484 (10.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71254 bytes 9361504 (9.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 204.205.229.101 netmask 255.255.255.0 broadcast 204.205.229.255
inet6 fe80::b6b0:24ff:fed2:5d3 prefixlen 64 scopeid 0x20<link>
ether b4:b0:24:d2:05:d3 txqueuelen 1000 (Ethernet)
RX packets 51126 bytes 9584453 (9.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 134724 bytes 17830947 (17.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 2584173 bytes 3568710276 (3.5 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2584173 bytes 3568710276 (3.5 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1492
inet 114.232.129.195 netmask 255.255.255.255 destination
168.95.98.254
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 31044 bytes 1719871 (1.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 55952 bytes 6333108 (6.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.141.35.89 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1649075366.A.F2F.html
推
04/04 20:33,
2年前
, 1F
04/04 20:33, 1F
想從不同的外網ip進來 再從同一個外網ip出去
推
04/04 20:39,
2年前
, 2F
04/04 20:39, 2F
請問具體要怎麼做呢?或是要用route嗎?
→
04/04 20:41,
2年前
, 3F
04/04 20:41, 3F
→
04/04 20:42,
2年前
, 4F
04/04 20:42, 4F
我的問題是我的外網ip假設是 114.232.129.195 跟 204.205.229.101
我從外網ping 114.232.129.195 通的時候 204.205.229.101 就不通
反之亦然,我想要兩個都ping的到 兩邊都有回應
→
04/04 20:42,
2年前
, 5F
04/04 20:42, 5F
→
04/04 20:44,
2年前
, 6F
04/04 20:44, 6F
→
04/04 20:44,
2年前
, 7F
04/04 20:44, 7F
→
04/04 21:02,
2年前
, 8F
04/04 21:02, 8F
→
04/04 21:03,
2年前
, 9F
04/04 21:03, 9F
→
04/04 22:21,
2年前
, 10F
04/04 22:21, 10F
→
04/05 01:01,
2年前
, 11F
04/05 01:01, 11F
→
04/05 01:01,
2年前
, 12F
04/05 01:01, 12F
→
04/05 01:02,
2年前
, 13F
04/05 01:02, 13F
→
04/05 01:02,
2年前
, 14F
04/05 01:02, 14F
→
04/05 01:04,
2年前
, 15F
04/05 01:04, 15F
→
04/05 05:09,
2年前
, 16F
04/05 05:09, 16F
感謝各位前輩給的資訊 小弟我先來找資料研究一下
※ 編輯: damody (220.141.35.89 臺灣), 04/05/2022 10:17:51
推
04/05 20:35,
2年前
, 17F
04/05 20:35, 17F
→
04/05 20:35,
2年前
, 18F
04/05 20:35, 18F
推
04/09 00:59, , 19F
04/09 00:59, 19F
→
05/19 23:46, , 20F
05/19 23:46, 20F
Linux 近期熱門文章
23
129
PTT數位生活區 即時熱門文章