SSH NAT to another network
-
sorry, but I did not understand how to do this.
I have to make a routing on OpenWRT?192.168.0.0/24 -> 192.168.10.109
-
So your pfsense natting and its network is behind a nat.
so you have this publicIP - wrt 192.168.0.? –- 192.168.0.? wan pfsense lan -- 192.168.10.? ---- 192.168.10.109 SSH Server?
So if you want to ssh in that sort of setup from where from the public internet then you would have to forward on wrt 22 to whatever that 192.168.0.x address is for pfsense wan, then on pfsense you would forward 22 to your 192.168.10.109 box.
Your going to have issues if your on the 192.168.0 network and want to nat reflect, ie hit the public IP with asymmetrical routing. In the case of wanting to ssh to 192.168.10.109 from boxes on the 192.168.0 network you would just hit your pfsense wan IP directly and let if forward.
If your trying to use pfsense behind a nat, and for an openvpn server into your network directly behind your wrt router your going to have all kinds of asymmetrical routing problems without source natting your openvpn connections.
-
OpenWRT does not use the network 192.168.0.X
router: 192.168.0.1 (DHCP Server)
PC: 192.168.0.100OpenWRT: 192.168.10.1 (DHCP Server)
pfsense (VM Proxmox)
wan: 192.168.0.132
opt1: 192.168.10.109–-------------------------------
I think that the connection does not work because the OpenWRT not find the ip source.
will the OpenWRT seeks ip 192.168.0.100 to close the connection?
if I do a routing, every connection to network 192.168.0.0/24 be redirected to the IP 192.168.10.109?
-
What??? So your pfsense is a VM?
Dude grab the napkin and the crayons and draw this.. Makes ZERO sense..
What is connected to what? Where is your wan/internet?
-
in the first post I created a diagram
pfsense is not the gateway, and does dhcp, I use pfsense to vpn, and to isolate networks.
in this case it isolates the OpenWRT
I have another interface on pfsense, LAN interface ip 192.168.100.1, it does dhcp to other VMs to isolate game servers.
I did not put the LAN interface in the diagram, because it will be used in this case.
-
Ok.. So you want to get to this openssh from where? Your PC in you drawing or the internet? You still need to create a port forward on pfsense. to the openwrt IP. Do you have gateway setup on wrt. Is that connected to wrt wan? Why is openwrt your dhcp server in this setup? so 192.168.10.1 is openwrt LAN IP? And there is nothing behind openwrt - what purpose is it then? Wireless? It sure can not be the gateway off the 192.168.10 network.
So if you want to get to it from your PC you have to hit your pfsense wan IP on that port 2222, for openwrt to be able to talk back it needs to have a gateway setup that would be pfsense IP in that network 192.168.10.109
-
got it!
I got to change the settings, and set DHCP on opt1 interface, OpenWRT was set to get IP by DHCP.
that way it worked!
so I can let the dhcp on OpenWRT and set the 192.168.0.109 (pfsense) as the gateway.
I'll try.
-
What possible reason do you want/need wrt to be dhcp server?
-
because it is not always this router is in my house.
-
ready
worked, set up the dhcp of the OpenWRT, I put the pfsense as gateway.
the dns I put 192.168.10.1 and 8.8.8.8
it's working!
OpenWRT has internet access, and I can connect via "PC".Thank you all
-
Why do you have wrt as dhcp server? Makes no freaking sense to me at all, why would you not have pfsense be your dhcp server for this 192.168.10 network?
-
sometimes I take this router to other places, it is not fixed in my house.
-
Ok… if you do that then turn on its dhcp server ;)
-
true, you're right.
I put the dhcp again in pfsense. 8)
Tks
-
I just do not want the network 192.168.10.0 to access the network 192.168.0.0
but I think this is for another topic.
-
I created a new topic to isolate the network 192.168.10.0