Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a server with Zentyal 3.0 (Ubuntu 12.04 LTS). I have 2 lancard (eth0 - internet, eth1 - LAN), a DNS (sz**.myftp.org).

The portforward works, but when I aks a request for DNS address or outer IP address from LAN, it can't contact the server. (when I do it from outside it can contact.)

Ask for anything that I used or I have, I will tell you about it.

share|improve this question
1  
You need to explain your setup in more detail. What machine are you making the request from? Where is the DNS entry for the host you're contacting recorded? Where is the DNS authority running? For all the machines involved: where are they located (inside/outside the LAN), what OS are they running, how is DNS configured? –  Gilles Oct 23 '12 at 22:34
    
Everything was configured with Zentyal's menus. Outside LAN I can reach the server via DNS, but inside LAN I can't.(DNS IP address also(89.*.*.*)). Otherwise local IP of the server(192.168.1.*) is works inside LAN. The OS makes no difference I think because I want to reach only webpages, but I tried Windows 7 and Ubuntu also. –  androbin Oct 25 '12 at 5:38
add comment

2 Answers

up vote 0 down vote accepted

As Per your Question , it's seems to me , there might be block Port UDP 53 for LAN Segment, So you can easily check , just Disable IPtables Service and Check it. Just Make Sure in Client Side DNS Should be Configured.

For Better Solution for DNS Setup Options as below :

Option 1:

You can use Public DNS in Your LAN eg. 8.8.8.8 , then your client Machine Can Reach to your Server.

Note:- This Option you might don't wont to use , because you may be restrict Client

Option 2:

if You are Using Internal/Intranet DNS Server in your LAN

In DNS there is concept/configuration like Internal Views and External Views

means in your local dns you have configure as Below if match Clients is your LAN Segment, then DNS Server will resolve Internal IP , then your can Clients can access webpage in LAN on LAN IP of your webserver.

if not match then DNS client answer Public IP.

Access this page for the same.

For troubleshooting you can use below command from client side in Windows

nslookup  myftp.org

in Linux

dig myftp.org

Or you can specify Server too as below :

dig myftp.org  @address_of_your_lan_dns_or_check_using_public

If DNS Is Properly Resolving then check Port 80(http)/21(ftp) open or not using :

In Windows/Linux telnet myftp.org 21

Or In linux

nc -zvw1 myftp.org 21
share|improve this answer
add comment

If you have NAT for your LAN. Setting up DNAT will make port forward working for outside world problem rises when computers from LAN (with LAN addressess) try to access your server in LAN through EXTERNAL IP.

This thing is fixed by setting masquerade (SNAT). something like this is needed in iptables config: lets say that your LAN is 192.168.2.0/24 and default GW for that subnet is 192.168.2.1 (eth1)

iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o eth1 -j SNAT --to 192.168.2.1

or

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.