Results 1 to 6 of 6
Hey there, I need to know what the Iptables "code" is to change the outgoing/Incoming IP for port 53 (DNS). I'm running CentOS on a dedicated server. I very familiar ...
- 03-31-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 3
Changing the Outgoing DNS (port 53) IP address with Iptables?
Hey there, I need to know what the Iptables "code" is to change the outgoing/Incoming IP for port 53 (DNS). I'm running CentOS on a dedicated server. I very familiar with Putty and SSH. So I don't need much details, I just can't figure this out. I asked my server providor but they deleted my ticket and didn't answer me.
I tried this but am not sure if this correct of working?
iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 53 -j SNAT --to xx.xx.xx.xx
Any help on this would be great! Thanks.
- 04-01-2009 #2
OK, why are you trying to change the ip address of the leaving packet?
- 04-01-2009 #3Just Joined!
- Join Date
- Mar 2009
- Posts
- 3
Our names are similar

Well I have to work around a block. See I run a these things called anonymous proxy sites and Facebook has kindly blocked my server from getting its DNS. So none of my users can access the site threw a cURL proxy script, I get "Namelookup timeout".
I need to change to my DNS IP. I have like 30 IPs on my server.
- 04-01-2009 #4
Post the output from the following command
Code:dig facebook.com
- 04-01-2009 #5Just Joined!
- Join Date
- Mar 2009
- Posts
- 3
I never knew that Dig thing.. Interesting. Its actually not Facebook I can't connect to its login.facebook.com . cURL returns. "namelookup timeout". But doing a Dig on that it does return the DNS. I really dont get this. I think there might some fatal error in the cURL gets DNS?
;Code:; ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Apr 1 15:39:03 2009 ;; MSG SIZE rcvd: 232 root@server [~]# dig login.facebook.com ; <<>> DiG 9.3.4-P1 <<>> login.facebook.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40015 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;login.facebook.com. IN A ;; ANSWER SECTION: login.facebook.com. 30 IN A 69.63.180.173 ;; AUTHORITY SECTION: login.facebook.com. 718 IN NS glb01.ams1.tfbnw.net. login.facebook.com. 718 IN NS glb01.ash1.tfbnw.net. login.facebook.com. 718 IN NS glb01.sf2p.tfbnw.net. ;; ADDITIONAL SECTION: glb01.ams1.tfbnw.net. 5759 IN A 69.63.191.219 glb01.ash1.tfbnw.net. 5759 IN A 69.63.185.11 glb01.sf2p.tfbnw.net. 5759 IN A 69.63.176.101 ;; Query time: 38 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Apr 1 15:39:22 2009 ;; MSG SIZE rcvd: 184
- 04-02-2009 #6
Yes, this shows that DNS is working.


Reply With Quote
