LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2012, 04:24 AM   #1
minipop4747
LQ Newbie
 
Registered: Sep 2011
Posts: 4

Rep: Reputation: Disabled
Thumbs up ping to destination ip by using source ip


I want to ping destination public ip using source ip in the command line

How can i do that ?
 
Old 09-06-2012, 05:33 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
You can use iptables SNAT, for example
Code:
iptables -t nat -A POSTROUTING -p icmp -d destination_ip_here -j SNAT --to-source source_ip_here
But few things you should known. Pings will not return to your host, but will or will not be delivered to your spoofed IP, it depends on security settings. If you use private IP range, routers will not route packets to hosts on public IP. Your router/provider can block spoofed source addresses and alert administrator about anomalies on network. You can be easily tracked down if you cause harm to other system.

Last edited by eSelix; 09-06-2012 at 07:15 PM.
 
Old 09-06-2012, 12:34 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
Dual post??

Last edited by jefro; 09-06-2012 at 12:36 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ping a destination server passing by a certain gateway madpsycho Linux - Networking 2 11-16-2011 12:42 PM
Ping: Destination Host Unreachable parashuram2011 Linux - Networking 3 10-21-2011 04:27 PM
Fedora 14, Ping: Destination host unreachable The Godfather Linux - Networking 1 05-06-2011 03:21 PM
ssh, ping and Destination Port Unreachable noir911 Linux - Server 5 04-02-2009 01:44 AM
when ping I get Destination host unreachable Fuzia Linux - Networking 1 06-19-2006 02:22 AM


All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration