Posted: Fri Aug 09, 2019 15:57 Post subject: How do I redirect the port on a Lan to Lan connection?
I am not all that familiar with advanced router config however I have a android file sharing server that uses SMB but cannot listen on 445. I need to somehow have the router direct all traffic on both lan and wan interfaces going to 192.168.1.200:445 to 192.168.1.200:2005.
I cannot find a obvious interface in the GUI that would allow me to accomplish this
I did find this post here but I am not entirely sure I understand the commands used or what is going on
I do not know exactly what you are trying to accomplish but maybe NAT loopback can do the trick.
Nah its not a loop back thing its a windows cant be told to connect to smb on anything other than port 445 so essentially ANY AND ALL traffic GOING TO 192.168.1.200 destined for port 445 needs to be redirected to port 2005 which is where the server is actually listening
Why not just reconfigure the SMB server to use the correct ports and block access to it from the WAN in your firewall?
Blame it on Google for being stupid with Android permissions and then not allowing root access on Android devices. Android cannot listen on Port 445 without being rooted.
This whole thing is nothing more than my attempt to be able to access files on my device faster without having to deal with the god-awful MTP crap
Joined: 18 Mar 2014 Posts: 12910 Location: Netherlands
Posted: Sat Aug 10, 2019 6:44 Post subject:
In the same subnet routing is done in layer 2 so no ip routing is possible as packets do not cross the firewall.
So you must have packets crossing the firewall i.e. packets must go out on the WAN and come in again in that way they cross the firewall and you can do IP routing.
Thanks for posting those code samples but could you explain a bit on what those commands are actually doing and how to manage those lists in case I need to undo it at a later point in time. and can you give me the networking for dummies version I am a bit out of my depth here
Joined: 13 Aug 2013 Posts: 6870 Location: Romerike, Norway
Posted: Sat Aug 10, 2019 9:02 Post subject:
It does not have to be the WAN port. You can NAT between two LAN interfaces (two interfaces on the router, not two ports on the switch). You can move one of the devices to a 3. sub-net i.e 192.168.2.x
Joined: 08 May 2018 Posts: 14242 Location: Texas, USA
Posted: Sat Aug 10, 2019 9:13 Post subject:
Per Yngve Berg wrote:
It does not have to be the WAN port. You can NAT between two LAN interfaces (two interfaces on the router, not two ports on the switch). You can move one of the devices to a 3. sub-net i.e 192.168.2.x
The OP is trying to redirect a tcp or udp port from one to another on the same IP address. The redirect target is used for this, in the nat table. The only limiting factor is if DD-WRT kernels support this or not.