Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INTERNET
- NAT
- + +
- | |
- | |
- | |
- | |
- | | +-------------+
- +----------------+ | | | |
- | VPS | | | | Muj PC |
- +---------> verejna IP +----------------------> |
- | | | | | |
- +----------------+ | | +-------------+
- | |
- | |
- | |
- | |
- | |
- | |
- + +
- Na VPS pridat do /etc/ssh/sshd_config "GatewayPorts yes".
- Stavajici situace:
- Na PC:
- # ssh -R *:2222:localhost:22 [email protected]
- Na VPS:
- # iptables -I INPUT -p tcp --dport 2222 -j ACCEPT
- # iptables -I FORWARD -p tcp --dport 2222 -j ACCEPT
- Pote pripojeni na PC:
- # ssh [email protected]
- # ssh localhost -p 2222
- Co chci:
- Na PC:
- # ssh -R *:2222:localhost:22 [email protected]
- Pro pripojeni na PC:
- # ssh -p 2222 [email protected]
Advertisement
Add Comment
Please, Sign In to add comment