Use Xpenology as a basic router

Recommended Posts

I found this when looking around. And it seems to work rather well


My situation


Xpenology setup

Trantors 4.3-3810 V1.4beta


3 Lan ports


Eth0 > Internal for NFS PXE booting etc which has an IP 192.168.0.x

Eth1 > Nothing

Eth2 > Connected to my router/internet which has an IP 10.0.0.x


What I wanted was to be able to PXE boot and install Operating systems to systems on the 192.168.0.x port of the Xpenology box


Fuddled my way around and half got ubuntu 12.04 PXE booting and installing....but it wants to get out to the internet and grab the latest packages at installation time.


Which it cannot do.


But searching around I found a guide,,, so will post it here in case others need something similar


ssh into your Xpenology box

change to this directory



inside you will notice a file


what we will do is create another file and call it


to do this type in




this will create a blank file


now we need to change the privilages of this file to match all the others

to do that use chmod command and we want 755 as the privilages (read write execute / read execute / read execute)


chmod 755


now we can edit the new file using vi




press i (for insert)

and enter the following


# Script to enable port forwarding and IP Masquerading, to share
# the primary internet connection to the second port of DS412+

# Enable port forwarding, in case not enabled by default
echo 1 > /proc/sys/net/ipv4/ip_forward

# Load the required modules
/usr/syno/etc.defaults/rc.d/ load_nat_mod forwarding_test

# Define the masquerading rule
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


note the last line

/sbin/iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE


make sure that is the internet facing network port which in my case happens to be eth3....yours might be eth0 if you have a basic setup.


reboot and test to see if you can reach the internet from and internal device.


live happy. :grin:


info taken from mortral @ the Synology forums


As you can see below..... the traffic passing out and back from eth0 through to eth3 :ugeek:





Share this post

Link to post
Share on other sites

If its of any use for you, synology DSM has built-in feature for sharing connection so if you find those configuration scripts, you may see how they do it. This feature is only activated when you have VPN, PPTP,PPoE login to your ISP connection. LAN port can be shared for internal devices to use the same tunnel.

Share this post

Link to post
Share on other sites

Yeah tried that with this version.... But must be buggy as PPP was causing crash dumps.

Share this post

Link to post
Share on other sites

I have only briefly tried it with original Syno box. It works fine, but I didn't have any use for it.

I didn't mean for you to use it, just to see their version of implementation.

Share this post

Link to post
Share on other sites

Hello all,


I was trying this too but it works very well. But i have a problem with speed. I have 1GB WAN Connection but maxim download speed is 220mbps.


I check the CPU when i do the speedtest but is at 30%. Any help? I think PPPoe connection slow this...


Any advice are welcome

Share this post

Link to post
Share on other sites

maybe you need better lan cards? ie ones with tcpip offload etc to relieve the cpu load?

Share this post

Link to post
Share on other sites