LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-11-2014, 05:27 AM   #1
rbaker
LQ Newbie
 
Registered: Mar 2014
Posts: 2

Rep: Reputation: Disabled
Redirect traffic from local ip address to another local ip


Hey guys,

Im having trouble finding a way to redirect the traffic coming from a local IP address to another local ip address using IPTABLES...

I'll try to explain.


There is a device in my network (local ip 172.0.54.15) that sends UDP data to a external ip (lets say it is 8.8.8.8). However, there are other devices in the network with different IP addresses that will output UDP data to the same destination (8.8.8.8).

I need to redirect the UDP traffic coming from 172.0.54.15 to 172.0.54.55:8088

But other devices should be able to reach 8.8.8.8


How do I do it?


Thanks in advance.
 
Old 03-11-2014, 06:03 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Looks like you are trying to query Google DNS server. If so,why can't configure the DNS setting in your devices?

To redirect port
iptables -t nat -A PREROUTING -s 172.0.54.15 -p udp -j DNAT --to-destination 172.0.54.55:8088
 
  


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
iptables redirect local ip traffic roof-us Linux - Networking 3 12-07-2011 10:56 AM
Redirect local port chenja Linux - Enterprise 1 09-29-2011 02:23 PM
Squid redirect web address to a local ip mudi Linux - Newbie 1 07-27-2009 06:59 AM
relay all non-local mail to 1 local address and NOT real destinations manqox Linux - Server 6 09-04-2008 05:13 AM
Traffic shaping for certain local IP address Kostko Linux - Networking 0 10-05-2002 06:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:37 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
Open Source Consulting | Domain Registration