NAT's router seems to change my source package

Discussions related to using VirtualBox on Linux hosts.
Post Reply
loi.dangthanh
Posts: 2
Joined: 21. Jun 2016, 08:43

NAT's router seems to change my source package

Post by loi.dangthanh »

Hi everyone, I'm trying to create a NATed architecture with virtualbox, as the following model
SimpleNAT-2.png
SimpleNAT-2.png (28.6 KiB) Viewed 716 times
My guest-machine only have a NAT network adapter with IP 10.0.3.15, with port forwarding 5060-5060, and ssh for connecting to outside.
I encounter a problem when my package from outside (192.168.1.11) get through the router to reach my guest, the src of the package has been modified

Code: Select all

//From my guest's perspective
<--- SIP read from UDP:10.0.3.2:50441 --->
INVITE sip:*65@192.168.1.19:5060;transport=UDP SIP/2.0
It supposed to remain unchanged 192.168.1.11 instead of 10.0.3.2 and I don't know how to configure it.

I'm sorry if this question is dumb.
Any advice would be appreciated.
Best Regards

Loi Dang
Smackey's dad
Posts: 128
Joined: 2. Apr 2014, 04:11
Primary OS: Ubuntu 12.04
VBox Version: OSE Debian
Guest OSses: Ubuntu Trusty
Location: Austin, TX
Contact:

Re: NAT's router seems to change my source package

Post by Smackey's dad »

With NAT Network there is no virtual networks defined. The NAT guest network interface is assigned to the IPv4 address subnet of 10.0.x.0/24. “x” corresponds to the VM's virtual network adapter number (of the said NAT interface) plus one. Only outgoing connections from the VM are permitted.

However, NAT Port Forwarding option, enables port forward with NAT Network Interface mode. The port forward happens via the host, unlike a typical port forward that happens from a LAN Router. Port forwarding allows connection to the guest to specific ports/services on the guest.

The other alternative is to use Bridged Networking to allow connections to your VM.
loi.dangthanh
Posts: 2
Joined: 21. Jun 2016, 08:43

Re: NAT's router seems to change my source package

Post by loi.dangthanh »

Dear Smackey's father :) ,

Bridge network sounds good to me, it works perfectly in some case.
But in this, I need to simulate some architectures that LAN router port forward does, and you mean it's not possible with virtualbox, don't you?

Many thanks for your help.

Best Regards,

Loi Dang
Post Reply