IP A can ping IP B, But IP B can't ping IP A on centos with two network interfaces Unicorn...
What is the best way to deal with NPC-NPC combat?
Second order approximation of the loss function (Deep learning book, 7.33)
What is this word supposed to be?
Map material from china not allowed to leave the country
What is the ongoing value of the Kanban board to the developers as opposed to management
What is it called when you ride around on your front wheel?
c++ diamond problem - How to call base method only once
Multiple options vs single option UI
What is the least dense liquid under normal conditions?
Additive group of local rings
Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network?
Can you stand up from being prone using Skirmisher outside of your turn?
Are these square matrices always diagonalisable?
Do I need to protect SFP ports and optics from dust/contaminants? If so, how?
What ability score does a Hexblade's Pact Weapon use for attack and damage when wielded by another character?
Retract an already submitted recommendation letter (written for an undergrad student)
Expansion//Explosion and Siren Stormtamer
Would reducing the reference voltage of an ADC have any effect on accuracy?
Mistake in years of experience in resume?
Justification for leaving new position after a short time
Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?
I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?
Trumpet valves, lengths, and pitch
Raising a bilingual kid. When should we introduce the majority language?
IP A can ping IP B, But IP B can't ping IP A on centos with two network interfaces
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionNetwork connectivity trouble to non-routing multi-homed hosts?routing problem - arpFTP not happening on RHEL 6 Server configured using a Vm Player 11Bridge eth0 and wlan0Simultaneous eth and wlan connectionDirect connection Centos7 (loadbalance) to QNAP (trunk)CentOS routing between multiple subnetHow can I override systemd's choice of default route with two network interfaces?Routing traffic to my ipv4 routes except 0.0.0.0 address?IPTables and Port Forwarding on an OpenVPNAS Server
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am trying to get copied packets from machine A to machine B. When I ping machine B from machine A, I get a ping response. When I ping machine A from machine B, I don't get a response. Machine A has 1 network interface. Machine B has two network interfaces with eth0 on a different subnet than machine A and eth1 on the same subnet as machine A.
Machine B (eth1) can ping 10.0.3.1 (gateway), but not 10.0.3.100 (machine A).
Both machines are running on AWS.
Here is machine B (ping not working):
SELinux set to permissive.
iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ip route show table all:
default via 10.0.3.1 dev eth1 table 1000
10.0.3.102 dev eth1 table 1000 scope link
default via 10.0.4.1 dev eth0
10.0.3.0/24 dev eth1 proto kernel scope link src 10.0.3.102
10.0.4.0/24 dev eth0 proto kernel scope link src 10.0.4.100
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
broadcast 10.0.3.0 dev eth1 table local proto kernel scope link src 10.0.3.102
local 10.0.3.102 dev eth1 table local proto kernel scope host src 10.0.3.102
broadcast 10.0.3.255 dev eth1 table local proto kernel scope link src 10.0.3.102
broadcast 10.0.4.0 dev eth0 table local proto kernel scope link src 10.0.4.100
local 10.0.4.100 dev eth0 table local proto kernel scope host src 10.0.4.100
broadcast 10.0.4.255 dev eth0 table local proto kernel scope link src 10.0.4.100
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fe80::/64 dev eth0 proto kernel metric 256 mtu 9001 pref medium
fe80::/64 dev eth1 proto kernel metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
local ::1 dev lo table local proto unspec metric 0 pref medium
local fe80::3f:c2ff:fe84:c930 dev lo table local proto unspec metric 0 pref medium
local fe80::ff:4ff:fefb:9a86 dev lo table local proto unspec metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 mtu 9001 pref medium
ff00::/8 dev eth1 table local metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
ip rule show table 1000:
32764: from all to 10.0.3.102 lookup 1000
32765: from 10.0.3.102 lookup 1000
ifconfig:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.4.100 netmask 255.255.255.0 broadcast 10.0.4.255
inet6 fe80::3f:c2ff:fe84:c930 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 1497 bytes 125307 (122.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1198 bytes 120891 (118.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.3.102 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::ff:4ff:fefb:9a86 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 88 bytes 5003 (4.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 105 bytes 6414 (6.2 KiB)
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 6 bytes 416 (416.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 416 (416.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Here is machine A:
iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
iptables -t mangle -L:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
TEE all -- anywhere anywhere TEE gw:ip-10-0-3-102.ec2.internal
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
ip route show table all:
default via 10.0.3.1 dev eth0
10.0.3.0/24 dev eth0 proto kernel scope link src 10.0.3.100
169.254.0.0/16 dev eth0 scope link metric 1002
broadcast 10.0.3.0 dev eth0 table local proto kernel scope link src 10.0.3.100
local 10.0.3.100 dev eth0 table local proto kernel scope host src 10.0.3.100
broadcast 10.0.3.255 dev eth0 table local proto kernel scope link src 10.0.3.100
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fe80::/64 dev eth0 proto kernel metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
local ::1 dev lo table local proto unspec metric 0 pref medium
local fe80::c0:a5ff:fe89:d238 dev lo table local proto unspec metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
ifconfig:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.3.100 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::c0:a5ff:fe89:d238 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 8096 bytes 4591057 (4.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6275 bytes 521551 (509.3 KiB)
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 6 bytes 416 (416.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 416 (416.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I am trying to get a copy of all traffic from machine A (eth0) to machine B (eth1) while still having use of machine B (eth0) for accessing the internet (which works right now). I think this is a routing issue, but I can't find the problem and most searches seem to refer to firewall issues (see iptables), netmask (they match), and routing (I can't find the issue).
The mangle table seems to be incrementing count, so packets are being copied, but tcpdump shows there are no packets received by machine B (eth1). This is the end goal ^
/etc/sysconfig/network:
NETWORKING=yes
GATEWAYDEV=eth0
/etc/sysconfig/network-scripts/ifcfg-eth1:
DEVICE=eth1
NAME=eth1
HWADDR=02:ff:04:fb:9a:86
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
NM_CONTROLLED=no
IPADDR=10.0.3.102
NETMASK=255.255.255.128
/etc/sysconfig/network-scripts/route-eth1:
default via 10.0.3.1 dev eth1 table 1000
10.0.3.102 dev eth1 table 1000
/etc/sysconfig/network-scripts/rule-eth1:
from 10.0.3.102 lookup 1000
to 10.0.3.102 lookup 1000
centos networking network-interface routing aws
New contributor
add a comment |
I am trying to get copied packets from machine A to machine B. When I ping machine B from machine A, I get a ping response. When I ping machine A from machine B, I don't get a response. Machine A has 1 network interface. Machine B has two network interfaces with eth0 on a different subnet than machine A and eth1 on the same subnet as machine A.
Machine B (eth1) can ping 10.0.3.1 (gateway), but not 10.0.3.100 (machine A).
Both machines are running on AWS.
Here is machine B (ping not working):
SELinux set to permissive.
iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ip route show table all:
default via 10.0.3.1 dev eth1 table 1000
10.0.3.102 dev eth1 table 1000 scope link
default via 10.0.4.1 dev eth0
10.0.3.0/24 dev eth1 proto kernel scope link src 10.0.3.102
10.0.4.0/24 dev eth0 proto kernel scope link src 10.0.4.100
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
broadcast 10.0.3.0 dev eth1 table local proto kernel scope link src 10.0.3.102
local 10.0.3.102 dev eth1 table local proto kernel scope host src 10.0.3.102
broadcast 10.0.3.255 dev eth1 table local proto kernel scope link src 10.0.3.102
broadcast 10.0.4.0 dev eth0 table local proto kernel scope link src 10.0.4.100
local 10.0.4.100 dev eth0 table local proto kernel scope host src 10.0.4.100
broadcast 10.0.4.255 dev eth0 table local proto kernel scope link src 10.0.4.100
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fe80::/64 dev eth0 proto kernel metric 256 mtu 9001 pref medium
fe80::/64 dev eth1 proto kernel metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
local ::1 dev lo table local proto unspec metric 0 pref medium
local fe80::3f:c2ff:fe84:c930 dev lo table local proto unspec metric 0 pref medium
local fe80::ff:4ff:fefb:9a86 dev lo table local proto unspec metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 mtu 9001 pref medium
ff00::/8 dev eth1 table local metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
ip rule show table 1000:
32764: from all to 10.0.3.102 lookup 1000
32765: from 10.0.3.102 lookup 1000
ifconfig:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.4.100 netmask 255.255.255.0 broadcast 10.0.4.255
inet6 fe80::3f:c2ff:fe84:c930 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 1497 bytes 125307 (122.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1198 bytes 120891 (118.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.3.102 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::ff:4ff:fefb:9a86 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 88 bytes 5003 (4.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 105 bytes 6414 (6.2 KiB)
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 6 bytes 416 (416.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 416 (416.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Here is machine A:
iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
iptables -t mangle -L:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
TEE all -- anywhere anywhere TEE gw:ip-10-0-3-102.ec2.internal
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
ip route show table all:
default via 10.0.3.1 dev eth0
10.0.3.0/24 dev eth0 proto kernel scope link src 10.0.3.100
169.254.0.0/16 dev eth0 scope link metric 1002
broadcast 10.0.3.0 dev eth0 table local proto kernel scope link src 10.0.3.100
local 10.0.3.100 dev eth0 table local proto kernel scope host src 10.0.3.100
broadcast 10.0.3.255 dev eth0 table local proto kernel scope link src 10.0.3.100
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fe80::/64 dev eth0 proto kernel metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
local ::1 dev lo table local proto unspec metric 0 pref medium
local fe80::c0:a5ff:fe89:d238 dev lo table local proto unspec metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
ifconfig:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.3.100 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::c0:a5ff:fe89:d238 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 8096 bytes 4591057 (4.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6275 bytes 521551 (509.3 KiB)
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 6 bytes 416 (416.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 416 (416.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I am trying to get a copy of all traffic from machine A (eth0) to machine B (eth1) while still having use of machine B (eth0) for accessing the internet (which works right now). I think this is a routing issue, but I can't find the problem and most searches seem to refer to firewall issues (see iptables), netmask (they match), and routing (I can't find the issue).
The mangle table seems to be incrementing count, so packets are being copied, but tcpdump shows there are no packets received by machine B (eth1). This is the end goal ^
/etc/sysconfig/network:
NETWORKING=yes
GATEWAYDEV=eth0
/etc/sysconfig/network-scripts/ifcfg-eth1:
DEVICE=eth1
NAME=eth1
HWADDR=02:ff:04:fb:9a:86
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
NM_CONTROLLED=no
IPADDR=10.0.3.102
NETMASK=255.255.255.128
/etc/sysconfig/network-scripts/route-eth1:
default via 10.0.3.1 dev eth1 table 1000
10.0.3.102 dev eth1 table 1000
/etc/sysconfig/network-scripts/rule-eth1:
from 10.0.3.102 lookup 1000
to 10.0.3.102 lookup 1000
centos networking network-interface routing aws
New contributor
I can't see where the suggested post departs from my config. Could you please explain?
– neoinageo
4 hours ago
add a comment |
I am trying to get copied packets from machine A to machine B. When I ping machine B from machine A, I get a ping response. When I ping machine A from machine B, I don't get a response. Machine A has 1 network interface. Machine B has two network interfaces with eth0 on a different subnet than machine A and eth1 on the same subnet as machine A.
Machine B (eth1) can ping 10.0.3.1 (gateway), but not 10.0.3.100 (machine A).
Both machines are running on AWS.
Here is machine B (ping not working):
SELinux set to permissive.
iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ip route show table all:
default via 10.0.3.1 dev eth1 table 1000
10.0.3.102 dev eth1 table 1000 scope link
default via 10.0.4.1 dev eth0
10.0.3.0/24 dev eth1 proto kernel scope link src 10.0.3.102
10.0.4.0/24 dev eth0 proto kernel scope link src 10.0.4.100
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
broadcast 10.0.3.0 dev eth1 table local proto kernel scope link src 10.0.3.102
local 10.0.3.102 dev eth1 table local proto kernel scope host src 10.0.3.102
broadcast 10.0.3.255 dev eth1 table local proto kernel scope link src 10.0.3.102
broadcast 10.0.4.0 dev eth0 table local proto kernel scope link src 10.0.4.100
local 10.0.4.100 dev eth0 table local proto kernel scope host src 10.0.4.100
broadcast 10.0.4.255 dev eth0 table local proto kernel scope link src 10.0.4.100
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fe80::/64 dev eth0 proto kernel metric 256 mtu 9001 pref medium
fe80::/64 dev eth1 proto kernel metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
local ::1 dev lo table local proto unspec metric 0 pref medium
local fe80::3f:c2ff:fe84:c930 dev lo table local proto unspec metric 0 pref medium
local fe80::ff:4ff:fefb:9a86 dev lo table local proto unspec metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 mtu 9001 pref medium
ff00::/8 dev eth1 table local metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
ip rule show table 1000:
32764: from all to 10.0.3.102 lookup 1000
32765: from 10.0.3.102 lookup 1000
ifconfig:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.4.100 netmask 255.255.255.0 broadcast 10.0.4.255
inet6 fe80::3f:c2ff:fe84:c930 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 1497 bytes 125307 (122.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1198 bytes 120891 (118.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.3.102 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::ff:4ff:fefb:9a86 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 88 bytes 5003 (4.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 105 bytes 6414 (6.2 KiB)
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 6 bytes 416 (416.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 416 (416.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Here is machine A:
iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
iptables -t mangle -L:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
TEE all -- anywhere anywhere TEE gw:ip-10-0-3-102.ec2.internal
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
ip route show table all:
default via 10.0.3.1 dev eth0
10.0.3.0/24 dev eth0 proto kernel scope link src 10.0.3.100
169.254.0.0/16 dev eth0 scope link metric 1002
broadcast 10.0.3.0 dev eth0 table local proto kernel scope link src 10.0.3.100
local 10.0.3.100 dev eth0 table local proto kernel scope host src 10.0.3.100
broadcast 10.0.3.255 dev eth0 table local proto kernel scope link src 10.0.3.100
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fe80::/64 dev eth0 proto kernel metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
local ::1 dev lo table local proto unspec metric 0 pref medium
local fe80::c0:a5ff:fe89:d238 dev lo table local proto unspec metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
ifconfig:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.3.100 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::c0:a5ff:fe89:d238 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 8096 bytes 4591057 (4.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6275 bytes 521551 (509.3 KiB)
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 6 bytes 416 (416.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 416 (416.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I am trying to get a copy of all traffic from machine A (eth0) to machine B (eth1) while still having use of machine B (eth0) for accessing the internet (which works right now). I think this is a routing issue, but I can't find the problem and most searches seem to refer to firewall issues (see iptables), netmask (they match), and routing (I can't find the issue).
The mangle table seems to be incrementing count, so packets are being copied, but tcpdump shows there are no packets received by machine B (eth1). This is the end goal ^
/etc/sysconfig/network:
NETWORKING=yes
GATEWAYDEV=eth0
/etc/sysconfig/network-scripts/ifcfg-eth1:
DEVICE=eth1
NAME=eth1
HWADDR=02:ff:04:fb:9a:86
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
NM_CONTROLLED=no
IPADDR=10.0.3.102
NETMASK=255.255.255.128
/etc/sysconfig/network-scripts/route-eth1:
default via 10.0.3.1 dev eth1 table 1000
10.0.3.102 dev eth1 table 1000
/etc/sysconfig/network-scripts/rule-eth1:
from 10.0.3.102 lookup 1000
to 10.0.3.102 lookup 1000
centos networking network-interface routing aws
New contributor
I am trying to get copied packets from machine A to machine B. When I ping machine B from machine A, I get a ping response. When I ping machine A from machine B, I don't get a response. Machine A has 1 network interface. Machine B has two network interfaces with eth0 on a different subnet than machine A and eth1 on the same subnet as machine A.
Machine B (eth1) can ping 10.0.3.1 (gateway), but not 10.0.3.100 (machine A).
Both machines are running on AWS.
Here is machine B (ping not working):
SELinux set to permissive.
iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ip route show table all:
default via 10.0.3.1 dev eth1 table 1000
10.0.3.102 dev eth1 table 1000 scope link
default via 10.0.4.1 dev eth0
10.0.3.0/24 dev eth1 proto kernel scope link src 10.0.3.102
10.0.4.0/24 dev eth0 proto kernel scope link src 10.0.4.100
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
broadcast 10.0.3.0 dev eth1 table local proto kernel scope link src 10.0.3.102
local 10.0.3.102 dev eth1 table local proto kernel scope host src 10.0.3.102
broadcast 10.0.3.255 dev eth1 table local proto kernel scope link src 10.0.3.102
broadcast 10.0.4.0 dev eth0 table local proto kernel scope link src 10.0.4.100
local 10.0.4.100 dev eth0 table local proto kernel scope host src 10.0.4.100
broadcast 10.0.4.255 dev eth0 table local proto kernel scope link src 10.0.4.100
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fe80::/64 dev eth0 proto kernel metric 256 mtu 9001 pref medium
fe80::/64 dev eth1 proto kernel metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
local ::1 dev lo table local proto unspec metric 0 pref medium
local fe80::3f:c2ff:fe84:c930 dev lo table local proto unspec metric 0 pref medium
local fe80::ff:4ff:fefb:9a86 dev lo table local proto unspec metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 mtu 9001 pref medium
ff00::/8 dev eth1 table local metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
ip rule show table 1000:
32764: from all to 10.0.3.102 lookup 1000
32765: from 10.0.3.102 lookup 1000
ifconfig:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.4.100 netmask 255.255.255.0 broadcast 10.0.4.255
inet6 fe80::3f:c2ff:fe84:c930 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 1497 bytes 125307 (122.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1198 bytes 120891 (118.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.3.102 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::ff:4ff:fefb:9a86 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 88 bytes 5003 (4.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 105 bytes 6414 (6.2 KiB)
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 6 bytes 416 (416.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 416 (416.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Here is machine A:
iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
iptables -t mangle -L:
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
TEE all -- anywhere anywhere TEE gw:ip-10-0-3-102.ec2.internal
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
ip route show table all:
default via 10.0.3.1 dev eth0
10.0.3.0/24 dev eth0 proto kernel scope link src 10.0.3.100
169.254.0.0/16 dev eth0 scope link metric 1002
broadcast 10.0.3.0 dev eth0 table local proto kernel scope link src 10.0.3.100
local 10.0.3.100 dev eth0 table local proto kernel scope host src 10.0.3.100
broadcast 10.0.3.255 dev eth0 table local proto kernel scope link src 10.0.3.100
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
unreachable ::/96 dev lo metric 1024 error -113 pref medium
unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium
unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium
unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium
unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium
unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fe80::/64 dev eth0 proto kernel metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
local ::1 dev lo table local proto unspec metric 0 pref medium
local fe80::c0:a5ff:fe89:d238 dev lo table local proto unspec metric 0 pref medium
ff00::/8 dev eth0 table local metric 256 mtu 9001 pref medium
unreachable default dev lo proto kernel metric 4294967295 error -101 pref medium
ifconfig:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001
inet 10.0.3.100 netmask 255.255.255.0 broadcast 10.0.3.255
inet6 fe80::c0:a5ff:fe89:d238 prefixlen 64 scopeid 0x20<link>
ether someMac txqueuelen 1000 (Ethernet)
RX packets 8096 bytes 4591057 (4.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6275 bytes 521551 (509.3 KiB)
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 6 bytes 416 (416.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 416 (416.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I am trying to get a copy of all traffic from machine A (eth0) to machine B (eth1) while still having use of machine B (eth0) for accessing the internet (which works right now). I think this is a routing issue, but I can't find the problem and most searches seem to refer to firewall issues (see iptables), netmask (they match), and routing (I can't find the issue).
The mangle table seems to be incrementing count, so packets are being copied, but tcpdump shows there are no packets received by machine B (eth1). This is the end goal ^
/etc/sysconfig/network:
NETWORKING=yes
GATEWAYDEV=eth0
/etc/sysconfig/network-scripts/ifcfg-eth1:
DEVICE=eth1
NAME=eth1
HWADDR=02:ff:04:fb:9a:86
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
NM_CONTROLLED=no
IPADDR=10.0.3.102
NETMASK=255.255.255.128
/etc/sysconfig/network-scripts/route-eth1:
default via 10.0.3.1 dev eth1 table 1000
10.0.3.102 dev eth1 table 1000
/etc/sysconfig/network-scripts/rule-eth1:
from 10.0.3.102 lookup 1000
to 10.0.3.102 lookup 1000
centos networking network-interface routing aws
centos networking network-interface routing aws
New contributor
New contributor
edited 3 hours ago
neoinageo
New contributor
asked 4 hours ago
neoinageoneoinageo
113
113
New contributor
New contributor
I can't see where the suggested post departs from my config. Could you please explain?
– neoinageo
4 hours ago
add a comment |
I can't see where the suggested post departs from my config. Could you please explain?
– neoinageo
4 hours ago
I can't see where the suggested post departs from my config. Could you please explain?
– neoinageo
4 hours ago
I can't see where the suggested post departs from my config. Could you please explain?
– neoinageo
4 hours ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
neoinageo is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f515345%2fip-a-can-ping-ip-b-but-ip-b-cant-ping-ip-a-on-centos-with-two-network-interfac%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
neoinageo is a new contributor. Be nice, and check out our Code of Conduct.
neoinageo is a new contributor. Be nice, and check out our Code of Conduct.
neoinageo is a new contributor. Be nice, and check out our Code of Conduct.
neoinageo is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f515345%2fip-a-can-ping-ip-b-but-ip-b-cant-ping-ip-a-on-centos-with-two-network-interfac%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I can't see where the suggested post departs from my config. Could you please explain?
– neoinageo
4 hours ago