icmp request received, but doesn't reply [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 4 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I set up 3 CentOS servers, configured server2 as router between 192.168.1.0/24 and 30.0.0.0/24, but ping can't get through.
I tried ping 192.168.1.62 from server1, according to tcpdump on server3, ICMP request is received, but it doesn't generate ICMP response.
23:36:06.436243 IP 30.0.0.2 > 192.168.1.62: ICMP echo request, id 23570, seq 2838, length 64
23:36:07.436212 IP 30.0.0.2 > 192.168.1.62: ICMP echo request, id 23570, seq 2839, length 64
Setup
Servers
server1:
eth0 - 30.0.0.2
server2:
eth0 - 192.168.1.61
eth0:0 - 30.0.0.1
server3:
eth0 - 192.168.1.62
Routing
route info on server1:
0.0.0.0 30.0.0.1
route info on server3:
30.0.0.0/24 192.168.1.61

I was receiving ICMP packets but did not see them go out. The problem was related to the traffic traversing multiple interfaces and reverse path filtering being on by default...
I've enabled martian source logging first:
$ echo 1 >/proc/sys/net/ipv4/conf/eth2/log_martians
Then there are several options for what to do with them... I'm enabling loosely handling them:
$ sysctl net.ipv4.conf.all.rp_filter=2
See these for details:
http://lartc.org/howto/lartc.kernel.html
https://access.redhat.com/site/solutions/53031

Run tcpdump with -e flag and see if the destination MAC address is correct.

Related

Global connection via netcat [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I would like to make very easy connection between two devices:
Device One is in WiFi1 and Device Two in WiFi2;
The Device One has local address 192.168.4.65;
The WiFi1 has IP address 12.34.56.78
(only example)
I want to run "nc -l <some parameters>" on my first device, and "nc <address>" on the second, so they connect;
I know, what to do if I want to connect two devices in a local area network;
But for global I have no Idea, what <some parameters> and <address> should be; can someone please help?
Thanks to #that-other-guy and #Barmar!!
You can do it by managing your router settings; If you configurate port forwarding, it will move you to the device you want to;
targeting 12.34.56.78:1234 to 192.168.4.65:1234. Then nc -l 1234 will be reachable with nc 12.34.56.78 1234

Blocking the to-destination with NAT and iptables [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have the following configuration:
ServerA: 192.168.168.200
ServerB: 172.23.10.10
They are separated by a RedHat box I'm trying to configure as a NAT device.
The box is configured as follows:
eth0: 172.23.10.1
eth1: 192.168.168.254
eth1:0: 192.168.168.10
I am trying to allow ServerA to only communicate with ServerB using the 192.168.168.10 address which should map via NAT to the 172.23.10.10 address.
ServerA (192.168.168.x) <-NAT ServerB (172.23.10.x)
I have configured the following iptables rule only on the RedHat box:
iptables -t nat -A PREROUTING -d 192.168.168.10 -j DNAT --to-destination 172.23.10.10
This appears to successfully implement the NAT translation. For example, when I ping 192.168.168.10 from ServerA it successfully reaches ServerB on it's 172.23.10.10 interface (and receives the response).
THE PROBLEM is that ServerA is still able to reach ServerB directly over 172.23.10.10, which I want to disallow.
How can I keep this NAT mapping in place, while blocking access to the actual destination address?
You didn't paste your full iptables output (iptables -vL -n nat), so this is a guess, but I'm betting, since it's RHEL, that your PREROUTING table has the default "ACCEPT" policy, so the traffic is skipping the NAT line, hitting the policy, and being accepted.
try:
iptables -n nat -P PREROUTING DROP

How to get the MAC Address of CLIENTS/USERS in different LANS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
Scenario: Main Linux Server is Connected to Local Switch Gateway. From Gateway to the network.
Now i can able to get the IP of the Remote Clients/Users who logged into the Server.
Linux Command : *"who -u" (gives me the IP Address of the users IP Address).*
For getting the MAC Address of the same user. I tried the arp -a command, It gave the switch MAC-Address only. I cant able to get the Remote Clients/User MAC Address.
Linux Command : "arp -a" (gives me the MAC Address of the Switch).
How to the MAC Address of the Remote Clients Machines ?
Note : My Client Machines can run on any OS (Windows/Linux/Solaris).
MAC addresses doesn't get routed, so the IP address would have to be of a host on your network. You will have to ping the IP address first and then use arp -a; like
ping <Remote_IP_Address>
arp -a <Remote_IP_Address>
See this related posts here
is-there-a-way-to-find-the-mac-address-of-a-remote-machine-i-have-connected-to-w
how-to-find-the-mac-address-of-a-remote-computer

How to configure 2 ip address on the same interface [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I want to configure my lan interface of the router with 2 IP address.
My router has OpenWRT as firmware
How to edit my openwrt config file inorder to have 2 ip address on the same lan interface?
ifconfig is a quite deprecated tool.
Today we have iproute2 suite which, for many reasons, is much better than ifconfig&co.
For example with iproute2 you don't have to use the "trick" of a virtual interface to have more the one ip address on the same physical interface:
ip addr add IP dev eth0
As you have tagged "linux" in your question, I guess OpenWRT is Linux based.
On Linux, you can do aliases to your eth0 interface. For example, to add an IP to an existing eth0 interface which has already one configured IP, you can do something like:
# ifconfig eth0:1 newIP ... rest of parameters ... (from root)
It would help if you add a sample of your configuration file to the question.

Routing all ips under a domain 000.000.x.x through vpn on linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I've succesfully run the command below to just add one computer on the network and have no problems connecting to it while the rest of my traffic goes unencrypted through my local connection.
sudo route add 000.000.123.123 gw 000.000.202.253 dev tun0
If I want to do something like the command below where I want to add everything under the domain 128.250.x.x to be routed to the gw. What is the command to do this? Do I need to change the netmask from 255.255.255.255 to something else?
sudo route add 000.000.*.* gw 000.000.202.253 dev tun0
You should be able to just write
sudo route add -net 128.250.0.0 netmask 255.255.0.0 gw 000.000.202.253 dev tun0

Resources