• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

VirtualBox internal network port forwarding ssh access to quest from host

Scheduled Pinned Locked Moved NAT
4 Posts 2 Posters 2.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    kuxi
    last edited by Jul 4, 2016, 8:37 AM

    I have 2 VM:

    1. Pfsense bridged and internal network
    2. Ubuntu internal network
      (they can communicate with each other and Ubuntu have access to internet)

    I want to be able access Ubuntu console from my host via ssh so i setup NAT port forwarding on port 22 but its not working, all other access should be blocked except for ssh port 22. i try access Pfsense from my host by putty and its work fine but for some reason i cant access my Ubuntu.

    I create 1 more Ubuntu2 for testing and put it in internal network and i was able to access Ubuntu from it by ssh so i guess that something is blocking my access to internal network from host( i think that access is blocked by default but port forwarding should allow me access to it right?).

    Any ideas what i'm doing wrong?

    Pfsense:
    WAN (wan) ->em0 -> v4/DHCP4: 192.168.0.6/24
    LAN(lan) ->em1-> v4: 192.168.1.1/24

    http://screenshot.sh/m2eUddgpNPKn9 Ubuntu
    http://screenshot.sh/m8X9x7l71uof9 NAT / WAN rules

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by Jul 4, 2016, 12:26 PM

      1. Pfsense bridged and internal network
      2. Ubuntu internal network

      Huh?  What network do you have this ubuntu box on the 192.168.1/24 ??  Can you post up your VB networking setup..

      If so what does pfsense have to do with anything unless your trying to access from pfsense WAN network?  You want to connect from your host?  The VM host, your host (workstation)?  So your saying your host that is running VB is on your wan network?  Why would it not be on your lan network?  So your host is behind pfsense firewall?

      But your nat is wrong - what is the dest port you have * this should be 22 if your sending to 22.. Your nat says send every PORT, every one to 22… That sure and the hell not going to work..

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

      1 Reply Last reply Reply Quote 0
      • K
        kuxi
        last edited by Jul 4, 2016, 1:42 PM

        I didn't make any changes in VB except settings networks adapters and setting static ip in ubuntu.
        http://screenshot.sh/mFx0lRVCzSzGN
        http://screenshot.sh/oAi7I5kFVRmY3

        Ubuntu is in same  internal network as Pfsense.

        well its a task that i want to do i should be able to access my Ubuntu in VR from host and i need to use for that Pfsense.
        Pfsense and Ubuntu shoud are in VB and access is from VB host
        and other communication like ping shoud be blocked trom host -> Ubuntu

        @johnpoz:

        But your nat is wrong - what is the dest port you have * this should be 22 if your sending to 22.. Your nat says send every PORT, every one to 22… That sure and the hell not going to work..

        Why is wrong? i dont know from what port that comunination will come? i just want to receive it on port 22. i think NAT is ok i can get access as long as im in same VB internal network but i can't get connection from host so probably i mess up something with IP setup?

        This is waht PFsense logs show when i try access shh thru putty
        1 when i try to access ubuntu is supose to be 192.168.0.3(host) -> 192.168.1.102 but its somehow doing this wrong
        2 when i try to access Pfsense from host and its works perfect i want to have same efect on Ubuntu but its not working
        http://screenshot.sh/n8dkfPA7uFZA7

        1 Reply Last reply Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by Jul 5, 2016, 4:45 AM

          your dest shoudl be 22.. Agreed you don't know what port the traffic will come form.. But you do know it will be going to 22..

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received