Port Forwarding Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
gregmo
Posts: 7
Joined: Fri Aug 21, 2020 12:08 am

Port Forwarding

Post by gregmo »

Any recommendations on a good port forwarding solution for DietPi? A little google searching turned up 'socat' as a possibility but seems like I recall using something even easier back in the day when I was more up on linux.
User avatar
WarHawk
Posts: 631
Joined: Thu Jul 20, 2017 8:55 am

Re: Port Forwarding

Post by WarHawk »

IPTables would be the best bet...are you trying to setup a firewall solution?
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: Port Forwarding

Post by Joulinar »

Hi,

would be good to know what you like to achieve. What scenario you are trying to implement?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gregmo
Posts: 7
Joined: Fri Aug 21, 2020 12:08 am

Re: Port Forwarding

Post by gregmo »

I have a main machine that is connected to a VPN that some sites block. What I would like to do is to hit the dietpi machine on the LAN and have it go out through the normal internet connection.
User avatar
WarHawk
Posts: 631
Joined: Thu Jul 20, 2017 8:55 am

Re: Port Forwarding

Post by WarHawk »

gregmo wrote: Wed Oct 21, 2020 1:39 am I have a main machine that is connected to a VPN that some sites block. What I would like to do is to hit the dietpi machine on the LAN and have it go out through the normal internet connection.
Sounds like you are wanting to do port tunneling using SSH

SSH to the dietpi machine inside the lan, then forward all traffic loopback thru SSH then out of the DietPi

https://www.skyverge.com/blog/how-to-se ... ith-putty/
User avatar
trendy
Posts: 150
Joined: Tue Feb 25, 2020 2:54 pm

Re: Port Forwarding

Post by trendy »

If the main machine is the router at your house and supports policy based routing, you can exclude the IP of the lan hosts which should use the normal internet connection.
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: Port Forwarding

Post by Joulinar »

I'm still lost on this request. What do you mean by
I have a main machine that is connected to a VPN that some sites block.
Does it mean you like to bypass the VPN for a specific set of URL /web sites ?? If yes, you would need some software analysing the request. Based in URL it's going to decide which interface to use?? But this has nothing to do with port forwarding.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gregmo
Posts: 7
Joined: Fri Aug 21, 2020 12:08 am

Re: Port Forwarding

Post by gregmo »

Joulinar wrote: Wed Oct 21, 2020 12:12 pm I'm still lost on this request. What do you mean by
I have a main machine that is connected to a VPN that some sites block.
Does it mean you like to bypass the VPN for a specific set of URL /web sites ?? If yes, you would need some software analysing the request. Based in URL it's going to decide which interface to use?? But this has nothing to do with port forwarding.
I have a desktop that is connected to a VPN and with it I'd like to be able to access sites that block connections from that VPN. The dietpi host isn't setup for the VPN so I can go through it I can access the sites I want. `socat' will do what I want, just curious if there is utility that is better suited to dietpi that will do the same thing.
User avatar
Joulinar
Posts: 2566
Joined: Sat Nov 16, 2019 12:49 am

Re: Port Forwarding

Post by Joulinar »

well first you would need to bypass VPN tunnel on your desktop computer. If you are able to do, you can use your internet router as gateway. No need to go to DietPi device.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gregmo
Posts: 7
Joined: Fri Aug 21, 2020 12:08 am

Re: Port Forwarding

Post by gregmo »

Joulinar wrote: Thu Oct 22, 2020 12:26 am well first you would need to bypass VPN tunnel on your desktop computer. If you are able to do, you can use your internet router as gateway. No need to go to DietPi device.
Thanks. This got me thinking and I minimal google searched revealed a tool to UNroute certain IP addresses so I can skip the dietpi host as you mentioned.
Post Reply