Skip to content
Ignat99 edited this page Nov 26, 2014 · 17 revisions

ddclient

inadyn

Activation

Step1

http://freedns.afraid.org/signup/activate.php?ffWSrv4fONdqAgYdetSNtSLj

Step2

Right click on "Direct URL" and copy the URL and paste it somewhere. http://freedns.afraid.org/dynamic/update.php?ZmZXU3J2NGZPTmRxQWdZZGV0U050U0xqOjEzMDM2MTIy

Step3

sudo apt-get install inadyn

Step4

Configure inadyn using the below steps: sudo nano /etc/inadyn.conf

And add the following contains in it replacing the actual values:

--username techhome --password mypassword --update_period 3600 --forced_update_period 14400 --alias techhome.homenet.org,alphanumeric key --background --dyndns_system [email protected] --syslog

Step 4 Now, we need to ensure that the DNS updater (Inadyn) runs automatically after every re-boot

export EDITOR=gedit && sudo crontab -e

Add the following line: @reboot /usr/sbin/inadyn

Step 5

Reboot system and then run the following command to ensure inadyn is running:

ps -A | grep inadyn

You can trying ssh-ing from another computer over the internet ssh [email protected]

Or, if any web server is running, then simply browse to http://techhome.homenet.org

Or, you can just ping it to test ping techhome.homenet.org

To check the logs you can use this: more /var/log/messages |grep INADYN

yandex

Port forwarding

Net interface on SmartPhone

busybox ifconfig -a

rmnet0 Link encap:Point-to-Point Protocol
inet addr:2.143.44.111 P-t-P:2.143.44.111 Mask:255.255.255.0

wlan0 Link encap:Ethernet HWaddr 20:64:32:5B:1F:5C
inet addr:192.168.43.1 Bcast:192.168.43.255 Mask:255.255.255.0

iptables

Read: If an incoming packet came from outside the gateway (2.143.44.111), but is a MJPG-steamer (port 8080), the destination address is replaced with the local address 192.168.43.51.

 iptables -t nat -A PREROUTING --dst 2.143.44.111 --protocol 6  --destination-port 8080 -j DNAT --to-destination 192.168.43.51

And then the router will transmit the packet to the local network.

 iptables -L  -v -n

Forward package that came to an external interface rmnet0, leaves the internal interface wlan0, and is designed for MJPG-steamer (192.168.43.51:8080) in LAN.

 iptables -I FORWARD 1 -i rmnet0 -o wlan0 -d 192.168.43.51 --protocol 6  -m tcp --destination-port 8080 -j ACCEPT

testing from outside of localnet

curl "http://artak:[email protected]:8080"

For client inside LAN.

 iptables -t nat -A POSTROUTING --dst 192.168.43.51 --protocol 6 --destination-port 8080 -j SNAT --to-source 192.168.43.1

For a gate himself

 iptables -t nat -A OUTPUT --dst 2.143.44.111 --protocol 6 --destination-port 8080 -j DNAT --to-destination 192.168.43.51

Test from the internal network

 wget http://artak:[email protected]:8080
Clone this wiki locally