0

I attached multiple ethernets to the server, one for LAN and the rest for PPPOE. Each packet connected to each PPPOE was sent by itself. It works fine on CentOS 6.10.

In the 8 series, packets are routed through the default LAN. MIRACLE LINUX is a RHEL compatible distribution.

I'm curious about the order of the results of "ip route". How about that.

# cat /etc/redhat-release
CentOS release 6.10 (Final)

# cat /etc/iproute2/rt_tables | grep -v "^#\|^$"
255     local
254     main
253     default
0       unspec
100  tbl_ppp0

# ip route
C.C.C.C dev ppp0  proto kernel  scope link  src A.A.A.A
169.254.0.0/16 dev eth0  scope link  metric 1002
default via 192.168.1.1 dev eth0

# ip route show table tbl_ppp0
default via A.A.A.A dev ppp0

# ip rule | grep tbl_ppp0
27373:  from A.A.A.A lookup tbl_ppp0

# cat /etc/squid/acl.conf  | grep ppp0
http_port A.A.A.A:3128 name=ppp0_IP
acl ppp0_acl myportname ppp0_IP
tcp_outgoing_address A.A.A.A ppp0_acl

# curl -s -m 2 http://ifconfig.co/ip -x A.A.A.A:3128
A.A.A.A
# tail /var/log/squid/access.log | grep A.A.A.A
1688498713.497    260 A.A.A.A TCP_MISS/200 683 GET http://ifconfig.co/ip - DIRECT/172.64.163.15 text/plain

 

# cat /etc/redhat-release
MIRACLE LINUX release 8.7 (Peony)

# cat /etc/iproute2/rt_tables |  grep -v "^#\|^$"
255     local
254     main
253     default
0       unspec
100 tbl_ppp0

# ip route
default via 172.20.0.1 dev enp1s0
169.254.0.0/16 dev enp1s0 scope link metric 1002
172.20.0.0/24 dev enp1s0 proto kernel scope link src 172.20.0.104
C.C.C.C dev ppp0 proto kernel scope link src B.B.B.B

# ip route show table tbl_ppp0
default via B.B.B.B dev ppp0

# ip rule | grep tbl_ppp0
32615:  from B.B.B.B lookup tbl_ppp0

# cat /etc/squid/acl.conf  | grep ppp0
http_port B.B.B.B:3128 name=ppp0_IP
acl ppp0_acl myportname ppp0_IP
tcp_outgoing_address B.B.B.B ppp0_acl

# curl -s -m 2 http://ifconfig.co/ip -x B.B.B.B:3128
X.X.X.X        ← this ip is enp1s0
# tail /var/log/squid/access.log | grep B.B.B.B
1688498755.023    282 B.B.B.B TCP_MISS/200 681 GET http://ifconfig.co/ip - HIER_DIRECT/172.64.163.15 text/plain
Cholho Lee
  • 21
  • 5
  • 2
    The order in which you enter the commands is not important. Routes are selected from most specific to least specific, not by order. – larsks Jul 04 '23 at 20:26
  • I solved. There was nothing wrong with the question. It was because the caller squid was not reloaded. – Cholho Lee Jul 13 '23 at 01:47

0 Answers0