Lan IP installation problem

zeus

Verified User
Joined
Apr 23, 2013
Messages
20
Hello,
I tried to install DA into a LAN with fixed external IP (behind a NAT/Port forwarding modem router) and iven if I followed DA online guide for the lan installations and many posts on this forum I didn't have success: I reach DA only via LAN internal IP and not via external IP.
I'm sure the natting/port forwarding is working fine because before to install DA the server answers on the SSH and 2222 ports succesfully.
I know I'm doing wrong something but I don't know what.
I followed the article about lan legacy installation https://www.directadmin.com/lan_legacy.php too.
I tried different installations on different OS but the result is the same.
I don't understand this step:
  1. Install DirectAdmin normally, using the "setup.sh auto" method
    • When it asks for which ethernet device, make sure you pick the device that holds the LAN IP (often eth0, ens192, venet0, etc).
    • Enter the external license IP, and not the LAN ip when asked. "
Iin my case, the auto installation never asks ethernet device.
What I'm doing wrong?
Could you help me, please?
Thank you very much
 
Have you configured your outbound NAT as well?

A common mistake I have seen is people configuring the inbound, but not the outbound NAT.
 
Have you configured your outbound NAT as well?

A common mistake I have seen is people configuring the inbound, but not the outbound NAT.
Hi Maniak,
do you means if my router natting is configured to work the answer is yes.
I don't know if this information is useful: after the installation, DA is configured automatically with external (fixed) IP and there isn't local IP into IP management settings.
It seems like DA doesn't listen on external IP address ports but just in local lan.
I think it's a misconfiguration about binding local/external ip but I don't know how to solve it.
 
Iin my case, the auto installation never asks ethernet device.
What I'm doing wrong?
You did nothing wrong. If you have used the "auto" method, then setup.sh is taking care of this.

Looks like I am having the same problem. I am running Centos Stream and installed DA without errors using the auto method.

Port forwarding in the router is ok (53, 80, 443, 2222). But DA control panel and websites are only accessible via internal IP. It is impossible to reach DA or websites using the external IP. I haven't setup name server yet (need to figure out how to do that with only one IP), but that should not matter I guess when one is using the external IP to reach the DA control panel and websites.

I have searched a lot about this issue but have not been able to find any good solution.

Any help would be greatly appreciated
 
So it appears now I am able to reach DA and websites via domain name (external DNS records at domain name provider) and external IP as long I am NOT connected to the local network where the DA server is running.

Can somebody give me some pointers in which direction I should find the solution?
 
It is impossible to reach DA or websites using the external IP
For others or only for you?
If only for you, then maybe it has to do with nat_loopback. Not every ISP modem is supporting nat_loopback which makes it impossible to reach things via your external IP from your lan.

A kind of workaround for this might be to use your hosts file, however in that case the traffic is not really going outside and back in.

If it's not nat_loopback then I don't know.
 
Hello,

Came here for the same problem.

- Installed Centos 8.x on a LAN/NATed VM with a working networking setup (LAN IP with 10.x.y.z/16 mask)
- Installed Directadmin with the automatic setup, everything goes well here too.

When the installation is finished network seems broken.
It can't reach anymore the DNS servers.

After checking a bit the system, it looks like directadmin adds the public IP address to the server with the same mask as the LAN.

Let's say I my public IP is 3.4.5.6, the network interface ends up having both IP configured:

10.x.y.z/16 and 3.4.5.6/16 configured.

But 3.4.5.6 is the WAN IP address of the router so trying to reach anything in 3.4.5.6/16 becomes a dead end.

Why is DA adding this IP to the host ?

Any idea how to get rid of this IP locally ? I can remove it manually with ip addr but after a reboot it's back.
I've grep'ed a bit the conf files and can't find in which file it's defined.

Thanks,
Sébastien
 
I gave it another try and restarted from scratch with same results.

After the installation the WAN ip of the router shows up on the directadmin VM with the same netmask as the local IP

2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 7e:20:33:15:3c:41 brd ff:ff:ff:ff:ff:ff
inet 10.111.x.x/16 brd 10.111.255.255 scope global noprefixroute ens18 (lan IP)
valid_lft forever preferred_lft forever
inet x.x.97.3/16 scope global ens18 (router wan IP)
valid_lft forever preferred_lft forever

And in the directadmin error log:

2021:02:19-17:06:02: The ip of this machine () does not match the ip in the license file.<br>
Check the value of your ethernet_dev=ens18 setting in your /usr/local/directadmin/conf/directadmin.conf file and the output of /sbin/ifconfig<br>
The wan IP shouldn't be on the machine for obvious reasons and it seems directadmin can't determine which ip to check for the license.
 
Back
Top