A
A
Aziz Madazimov2013-12-26 17:05:11
ubuntu
Aziz Madazimov, 2013-12-26 17:05:11

How to set up remote access to your home server using DDNS?

Hello. There is a server on Ubuntu 13.10 which is connected to the local network via an ADSL Wi-Fi router. IP address is dynamic, ISP uses NAT. Through the local network everything works fine, there is access to the server. But you need remote access. Since the IP is dynamic, I decided to use the noip.com service to connect through the domain. The Dynamic Update Client (DUC) is installed and configured on the server, the domain of the xyz.no-ip.biz type is pinged, but there is no access through it. I read that you need to do port forwarding in the router to the local IP address of the server, but I can not understand how this is done. The router is running OpenWRT. I tried to add a configuration to /etc/config/firewall (I need access on port 10300, 192.168.1.151 is the IP address of the server on the local network) but nothing happened.

config redirect
        option name 'test'
        option src 'wan'
        option proto 'tcpudp'
        option src_dport '10300'
        option dest_ip '192.168.1.151'
        option target 'DNAT'
        option dest 'lan'

I would be grateful if someone suggested what I'm doing wrong and what is my mistake. I'm new to Linux, and I'm not very familiar with network settings either. Wouldn't it be better for me to configure the no-ip settings in the router itself? How then, in this case, can I correctly configure the redirection of requests to the xyz.no-ip.biz domain to the server, but at the same time so that it does not appear on other devices on the network when working with the Internet?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya Evseev, 2013-12-28
@illusionist

The ISP is using NAT.

What IP does it give out?
If 10.*, 192.168.* or 172.16-31.* then dyndns won't help.

A
Artem, 2013-12-26
@Properrr

wan - the name of the network interface through which you are connected to the Internet provider.
lan - the name of the network interface of your local network.

config 'redirect'
        option 'name' 'Magic 10300 port'
        option 'src' 'wan'
        option 'proto' 'tcpudp'
        option 'src_dport' '10300'
        option 'dest_ip' '192.168.1.151'
        option 'target' 'DNAT'
        option 'dest' 'lan'

And do not forget: write down the config, restart the firewall:
/etc/init.d/firewall restart

I
Ilya Evseev, 2013-12-29
@IlyaEvseev

https://secure.logmein.com/RU/labs/#HamachiforLinux

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question