Jump to content

Can I change router firewall from an SSH connection?

kelvinhall05

So the title sucks and what I'm doing sounds super sketchy, but bear with me. I've been attempting to set up a VPN on my server at home, but I suppose I've incorrectly configured my firewall and although I know what's wrong and what I should fix, I'm not at home and would rather not wait to get home to do this so I can test it from school. Anyway, I have an SSH connection to a desktop running Ubuntu Server that's on my home network. Is it possible to configure my router firewall through SSH only (if I could use remote desktop I wouldn't even make this thread)? Thanks!

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

If your router supports Telnet or SSH then yes.

If it does not then you need access to the WebUI which you'd need a GUI for.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Windows7ge said:

If your router supports Telnet or SSH then yes.

If it does not then you need access to the WebUI which you'd need a GUI for.

Not certain if it supports SSH. Not a super fancy router. I also don't have it set up which I assume I would need to do locally at home.

 

EDIT: I meant modem, whoops. Anyway, it's a "coda-4582", whatever the fuck that is. I'm wired directly into it with my server and desktop.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, kelvinhall05 said:

Not certain if it supports SSH. Not a super fancy router. I also don't have it set up which I assume I would need to do locally at home.

 

EDIT: I meant modem, whoops. Anyway, it's a "coda-4582", whatever the fuck that is

Modems & Routers are separate devices that serve different functions but work together to provide a service. ISP's popularly provide units that are a 2 in 1 Modem/Router combo. You were correct the first time around. The Router is where you'd configure firewall rules.

 

I'll Google it for a min but I think you're SOL unless you have Teamviewer or something similar running (something to consider for the future).

Link to comment
Share on other sites

Link to post
Share on other sites

A small amount of Googling says it may support Telnet but to figure out how to actually connect and then find the commands to open the ports you need you'll probably be home already.

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, Windows7ge said:

Modems & Routers are separate devices that serve different functions but work together to provide a service. ISP's popularly provide units that are a 2 in 1 Modem/Router combo. You were correct the first time around. The Router is where you'd configure firewall rules.

 

I'll Google it for a min but I think you're SOL unless you have Teamviewer or something similar running (something to consider for the future).

Yeah, but my school firewalls every RDP I've tried. Otherwise I'd already have one set up.

Quote me to see my reply!

SPECS:

CPU: Ryzen 7 3700X Motherboard: MSI B450-A Pro Max RAM: 32GB I forget GPU: MSI Vega 56 Storage: 256GB NVMe boot, 512GB Samsung 850 Pro, 1TB WD Blue SSD, 1TB WD Blue HDD PSU: Inwin P85 850w Case: Fractal Design Define C Cooling: Stock for CPU, be quiet! case fans, Morpheus Vega w/ be quiet! Pure Wings 2 for GPU Monitor: 3x Thinkvision P24Q on a Steelcase Eyesite triple monitor stand Mouse: Logitech MX Master 3 Keyboard: Focus FK-9000 (heavily modded) Mousepad: Aliexpress cat special Headphones:  Sennheiser HD598SE and Sony Linkbuds

 

🏳️‍🌈

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, kelvinhall05 said:

Yeah. Otherwise I'd already have one set up.

Hm? What was that? My visions been giving problem I didn't quite catch that. ;)

Link to comment
Share on other sites

Link to post
Share on other sites

You could use an ssh tunnel, basically you create an ssh tunnel with an ssh client and connect to that proxy using a browser (firefox supports it, chrome doesn't) and you will have internet access in the browser as if you were in using the device that you sshd into

 

here is a tutorial (check dynamic port forwarding):

https://www.howtogeek.com/168145/how-to-use-ssh-tunneling/

Link to comment
Share on other sites

Link to post
Share on other sites

Depending on how the router UI works, you may also be able to tunnel the routers UI port to the SSH client.

Assuming Windows you can do this with Putty.  Put all the details in as normal but then look under Connection, SSH, Tunnels.  Set source port: 80 Destination: routerip:routeruiport (likely 80), tick Local, now establish the connection.

You then open a browser at http://127.0.0.1 and it should display your router UI.

 

Word of warning, many routers when changing settings will try to redirect back to their default domain name.  Your changes will usually work fine, but you'll have to change the URL back to 127.0.0.1 to get the page to load again.

If your router uses SSL you would need to use port 443 and your browser will throw a bunch of warnings about the certificate that you would have to tell it to ignore.

Router:  Intel N100 (pfSense) WiFi6: Zyxel NWA210AX (1.7Gbit peak at 160Mhz)
WiFi5: Ubiquiti NanoHD OpenWRT (~500Mbit at 80Mhz) Switches: Netgear MS510TXUP, MS510TXPP, GS110EMX
ISPs: Zen Full Fibre 900 (~930Mbit down, 115Mbit up) + Three 5G (~800Mbit down, 115Mbit up)
Upgrading Laptop/Desktop CNVIo WiFi 5 cards to PCIe WiFi6e/7

Link to comment
Share on other sites

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

×