Jump to content
Not connected, Your IP: 3.147.103.33
silvianismo

setup port forward nat-start on merlin

Recommended Posts

#!/bin/sh

 

iptables -t nat -A POSTROUTING -o tun15 -j MASQUERADE

 

iptables -I FORWARD -i tun15 -p udp -d 192.168.1.40 --dport 61841 -j ACCEPT

iptables -I FORWARD -i tun15 -p tcp -d 192.168.1.40 --dport 61841 -j ACCEPT

iptables -t nat -I PREROUTING -i tun15 -p tcp --dport 61841 -j DNAT --to-destination 192.168.1.40

iptables -t nat -I PREROUTING -i tun15 -p udp --dport 61841 -j DNAT --to-destination 192.168.1.40

iptables -I FORWARD -i tun15 -p udp -d 192.168.1.1 --dport 61840 -j ACCEPT

iptables -I FORWARD -i tun15 -p tcp -d 192.168.1.1 --dport 61840 -j ACCEPT

iptables -t nat -I PREROUTING -i tun15 -p tcp --dport 61840 -j DNAT --to-destination 192.168.1.1

iptables -t nat -I PREROUTING -i tun15 -p udp --dport 61840 -j DNAT --to-destination 192.168.1.1

iptables -I FORWARD -i br0 -o tun15 -j ACCEPT

iptables -I FORWARD -i tun15 -o br0 -j ACCEPT

iptables -I FORWARD -i br0 -o vlan1 -j DROP

iptables -I INPUT -i tun15 -j REJECT

 

 

 

 

whats is wrong with it.. Does he have a simple command to join all my open port to my preconfigure port on airvpn.. Thanks

Share this post


Link to post

Hi,

 

Most if not all routers won't allow traffic from the internet onto the LAN-facing interface.

You'll have to allow remote management in your router and access it on your public IP address.

Share this post


Link to post

I want to use more than one port.. I'm not able to configure 2 ports! Thanks ( Scuse me for my English )

 

you certainly can.  it's just that you can't forward to the router itself it seems.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...