Jump to content

Hey all
Back again with yet another networking question
 

This time there is the setup
I have a linux router, doing portforwarding using IPtables.
External client logs into internal server using ssh on routers external IP

What im looking for is a graceful way to close the connection
Not block it, just close it.

Currently I am adding a forward drop to the top of the tables list, and that breaks the connection, but it doesn't drop it properly, and as soon as I remove the rule, the connection just pops back up

What im wanting is for when I drop the connection, the client drops properly and has to re connect to the server, rather than just auto connecting 
(If that makes any sense?)
 

And yes I know there is a timeout, (putty will timeout if no connection is made within a certain time), but I want it to work for everything, even if the timeout isn't set on the client side
 

Thanks again for any help, and fingers crossed there is a good way of doing this

Link to comment
https://linustechtips.com/topic/852068-help-with-dropping-ssh-though-linux-router/
Share on other sites

Link to post
Share on other sites

What is the end goal here?

 

If you want to properly disconnect/end a SSH session you have to do it on the server itself by killing the associated processes.

Home theater gaming rig: AMD 5800X, Asus TUF Radeon 6900 XT, 32 GB, 65" LG C1 OLED, custom chassis (link to build log)

Link to post
Share on other sites

11 hours ago, Just.Oblivious said:

What is the end goal here?

 

If you want to properly disconnect/end a SSH session you have to do it on the server itself by killing the associated processes.

The goal is to be able to end a single ssh session when you dont have access to the server only the router
(Its for a uni project and its easier to just explain it that way)

I have found "Cutter" which seems to do what I want, just is so out of date it wont run on newer linux builds

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×