TP-WR841n - one port access to WAN but other only to LAN

TP-WR841n - one port access to WAN but other only to LAN

TP-WR841n - one port access to WAN but other only to LAN
TP-WR841n - one port access to WAN but other only to LAN
2024-11-11 17:52:41
Tags: #Network Connectivity #router configuration
Model: TL-WR841N_EU  
Hardware Version: V10
Firmware Version: OpenWrt Chaos Calmer 15.05.1

Hello,

 

Here is the topology of my network:

- SWITCH_1 via ethernet is connected to

    - the internet router

    - a computer (PC1)

    - the router TL-WR841N

- TL-WR841N via ethernet is connected to:

    - a computer (PC2)

- TL-WR841N via wifi is connected to:

    - a computer (PC3)

 

By default, PC2 and PC3 are on the same subnetwork and can access to internet and to each other but not to PC1.

I want to change the configuration so the PC1 can access to the PC2. I want to keep the config so the PC3 can access to the internet but not to PC1.

 

I tried a lot of thing on the admin panel to do that but i think i don't understand well how to do that.

 

Can you explaine me what should i do ?

 

Thank for your help.

  0      
  0      
#1
Options
10 Reply
Re:TP-WR841n - one port access to WAN but other only to LAN
2024-11-11 21:26:47

  @pioche 

 

If you move PC2  to the Switch_1 where the PC1 is you should be able to achieve this.

But In this topology PC2 and PC3 won't see each other because they won't be on the same subnet anymore.

If this was helpful click on the arrow pointing upward to make it blue. If this solves your issue, click the star to make it blue and mark the post as a "Recommended Solution".
  0  
  0  
#2
Options
Re:TP-WR841n - one port access to WAN but other only to LAN
2024-11-12 10:24:56

  @terziyski I can't do that, PC1 and  PC2 are not on the same floor sad

  0  
  0  
#3
Options
Re:TP-WR841n - one port access to WAN but other only to LAN
2024-11-12 19:04:11

  @pioche 

 

With this topology there's no other way to do this except running a cable from PC2 to the Switch_1.

If this was helpful click on the arrow pointing upward to make it blue. If this solves your issue, click the star to make it blue and mark the post as a "Recommended Solution".
  0  
  0  
#4
Options
Re:TP-WR841n - one port access to WAN but other only to LAN
2024-11-25 19:41:00

  @terziyski 

Alternatively, is there a solution to acces to an application running on PC2 on a given port from PC1 ? It's ok if this application is accessible drom PC3.

 

I tied to use the port forwarding and static routes but it's not working. Do you know how i should configure the router ?

  0  
  0  
#5
Options
Re:TP-WR841n - one port access to WAN but other only to LAN
2024-11-25 20:31:01

  @pioche 

 

You should be able to acces an application running on a given port of PC2 from PC1 by configuring a port-forwarding (virtual servers) on TP-WR841n - example.

If this was helpful click on the arrow pointing upward to make it blue. If this solves your issue, click the star to make it blue and mark the post as a "Recommended Solution".
  1  
  1  
#6
Options
Re:TP-WR841n - one port access to WAN but other only to LAN
2024-11-26 09:52:01

  @terziyski 

Unfortunatly, the GUI version of the example you provide is not the same as the GUI version of my router.

My Firmware Version is OpenWrt Chaos Calmer 15.05.1 / LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55)

 

I can't find the virtual server panel.

Here is what i see on the network admin panel:

 

Here is what i tried:

  • in Firewall - Traffic rules, i added 2 rules:
    • Any TCP From any host in wan To any router IP at port 7000 on this device
    • Any TCP From any host in wan with source port 7000 To IP 192.168.1.33, port 7000 in lan
  • in Firewall - por forwarding, i added 1 rule:
    • IPv4-TCP From any host in wan with source port 7000 Via any router IP at port 7000

 

But when i try to access to the app on port 7000 on PC2 from the wan on PC1 via the ip of the TL-WR841N router like this http://192.168.1.14:7000

Nothing append, the request is blocked.

 

I used the ip showed in overview admin panel:

 

  0  
  0  
#7
Options
Re:TP-WR841n - one port access to WAN but other only to LAN
2024-11-26 14:34:29

  @pioche 

 

This is not the stock FW of TP-WR841n.

Check this article for port-forwarding in OpenWRT - <https>://www.wundertech.net/how-to-port-forward-in-openwrt/

and give it a try.

If this was helpful click on the arrow pointing upward to make it blue. If this solves your issue, click the star to make it blue and mark the post as a "Recommended Solution".
  0  
  0  
#8
Options
Re:TP-WR841n - one port access to WAN but other only to LAN
2024-11-27 15:54:21

  @terziyski 

I'am not sur to understand which ip adress i should use as internal ip adresse.

The app i want to access is a web server running on port 7000 on PC2 (192.168.1.33)

But when i set this,the app is not accessible from my primary network.

 

In the tutorial you gave me, it uses the ip of the openwrt router, should i set this one on the port forwarding ??

  0  
  0  
#9
Options
Re:TP-WR841n - one port access to WAN but other only to LAN
2024-11-27 21:45:55

  @pioche 

 

This looks correct as a port-forwarding rule:

If you are accessing the PC2 from PC1 you should open http://192.168.1.14:7000.

If you are accessing PC2 from PC3 you should open http://192.168.1.33:7000.

That is if WR840N is working in router mode and is doing a NAT.

What concerns me is the WAN IP address of WR841N - according to your screenshot iti's 192.168.1.14.

Your PC2 can't have an IP address (192.168.1.33) in the same subnet (192.168.1.0/24) as your WR840N WAN port.

Most probably this is the main reason for port-forwarding not working as expected.

If this was helpful click on the arrow pointing upward to make it blue. If this solves your issue, click the star to make it blue and mark the post as a "Recommended Solution".
  0  
  0  
#10
Options
Re:TP-WR841n - one port access to WAN but other only to LAN
3 weeks ago

  @terziyski 

 

That is if WR840N is working in router mode and is doing a NAT.

How can i be sure that my router is doing a NAT ? Is it possible that it does not have the option ?


Your PC2 can't have an IP address (192.168.1.33) in the same subnet (192.168.1.0/24) as your WR840N WAN port.

So how can i access to PC2 via the WAN network of the router if the ip is not 192.168.1.33 ? is it another ip I have to found ? or it's just not accessible ?

If i have to pass through the router ip adress (192.168.1.14), how to tell the router to redirect the trafic from the wan on port 7000 to the soubnetwotk ip adress 192.168.1.33:7000 ?

Is it with in the firewall configuration page ?

 

Here is the firewall zone settings:

 

Here is the settings of a new zone when i click on Add button:

  0  
  0  
#11
Options

Information

Helpful: 0

Views: 227

Replies: 10

Tags

Network Connectivity
router configuration
Related Articles