LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-12-2013, 12:54 AM   #1
dr.x
Member
 
Registered: Jan 2013
Posts: 231

Rep: Reputation: Disabled
help with linux iptables ??!!!


hi all ,
i will describe my issue first :
i have dns server with ip 11.11.11.11
sometime my client use dns 8.8.8.8 , and in this case , from cisco router , i redirect those dns requests to the dns server 11.11.11.11

""note that the packets has dst ip 8.8.8.8 not 1.1.1.1 but it reached to dns server with 1.1.1.1 ip""


the issue is :
the redirected packets still have the destination ip 8.8.8.8 not 11.11.11.11 ,
my question is how let the dns server 11.11.11.11 reply to these packets although its destination ip not 11.11.11.11 ????

i think it need some work with iptables so that dns server dont drop these packets.

with to help
regards
 
Old 11-12-2013, 07:41 AM   #2
hussam.dh
LQ Newbie
 
Registered: Nov 2013
Posts: 16

Rep: Reputation: Disabled
Try this :
iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to-destination 11.11.11.11

Add this for tcp:
iptables -t nat -A PREROUTING -p tcp --dport 53 -j DNAT --to-destination 11.11.11.11
 
  


Reply



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 can't initialize iptables table `filter': Bad file descriptor donalbane Linux - Networking 2 08-17-2011 08:36 AM
iptables error in android: iptables-save and iptables-restore not working preetb123 Linux - Mobile 5 04-11-2011 01:56 PM
On what basis CHAIN integer values are generated in IPtables under iptables file? haariseshu Linux - Server 3 11-05-2009 04:25 AM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 06:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:49 PM.

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