• SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Dnat

Paxsat

Regular Contributor
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

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:
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

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

No plan to integrate either.

Adding those interfaces would make no sense to me, since that tunnel is actually going through the primary link.
 
Non mi sembra che sia primaria. Se imposto la connessione wan PPTP con swissvpn allora riesco a vedere le mie ipcam. se creo client vpn "ip cam non disponibile". stesso portfowarding. se vuoi ti faccio accedere al mio pc per verificare
(Google)
I do not think that it is primary. If I set the WAN PPTP connection with swissvpn then I can see my ipcam. if I create vpn client "ip cam not available." portfowarding same. if you want I'll go to my pc to check
 
tun11 and ppp5 are VPN clients, which have to connect through an existing WAN interface. It would make no sense to have them being selectable as a secondary WAN interface.
 
ok not in WAN but Dnat or like..
gui for set..

interface port IP CLIENT local port prot
TUN11 9893 192.168.2.59 88 TPC
PPP5 9892 192.168.2.20 80 UDP
WAN 5900 192.168.2.2 5900 etc
 
with wan portforwarding works (see my ipcam work and vnc) with pptp vpn not ..
 

Attachments

  • Wan.jpg
    Wan.jpg
    70 KB · Views: 362
  • wpn.jpg
    wpn.jpg
    67.7 KB · Views: 400

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top