Merlin sarà possibile avere in una prossima versione una GUI per il DNAT
Merlin will be able to have in a future version of a GUI for the DNAT
it would be nice to find tun11 and ppp5 in dual wan (Wan - USB-LAN - PPP - TUN) fantastic
Merlin will be able to have in a future version of a GUI for the DNAT
Code:
You need to create a basic DNAT on your router.
Assuming that:
destIP is the IP address of the destination device
port is the port you wish to forward to that device
tun1 is the tun interface of your router (please check! on some routers it can be tun0, on Tomato it can be tun11)
you need to forward both TCP and UDP packets
you need to add the following rules. Please note that the following rules do NOT replace your already existing rules, you just have to add them.
iptables -I FORWARD -i tun1 -p udp -d destIP --dport port -j ACCEPT
iptables -I FORWARD -i tun1 -p tcp -d destIP --dport port -j ACCEPT
iptables -t nat -I PREROUTING -i tun1 -p tcp --dport port -j DNAT --to-destination destIP
iptables -t nat -I PREROUTING -i tun1 -p udp --dport port -j DNAT --to-destination destIP
it would be nice to find tun11 and ppp5 in dual wan (Wan - USB-LAN - PPP - TUN) fantastic
Last edited: