LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-14-2016, 09:54 PM   #1
neutron878
LQ Newbie
 
Registered: Feb 2016
Posts: 1

Rep: Reputation: Disabled
Routing Issue - I think


I'm having a bit of an issue with a dual network setup in on a VM guest in Proxmox. I'm pretty sure this is not directly Proxmox related.

Here is the situation. I have to VM guests, first a pFsense host and second a linux Ubuntu host.

The linux Ubuntu host has two network interface cards setup. one with a public IP which currently has all ports blocked with IP tables except port 22 for ssh. The second network interface has a local IP 192.x.x.x

The pFsense guest has two network interfaces. The first interface is the WAN interface with a public IP and the second network interface is on the LAN with a local IP of 192.x.x.x Same subnet as the second interface of the Ubuntu guest.

I can ping back and forth between the two local IPs of both VMs. I can ssh back and forth between both local interfaces. So all is good there. Both VM guests can also access the internet just fine out of their WAN interfaces.

Here is the issue. I would like to port forward say port 2222 from the pFesnse guest to the Ubuntu host port 22. When I setup the port forward and setup a tcpdump on the Ubuntu guest I can see that the request coming in but instead of responding out of the network interface that is on the LAN, therefore completing the port forward request it responds out of the WAN interface. I thought this was an issue with the routing table as the WAN interface has the default gateway so I added a route for the 192.x.x.x to go out of the LAN network interface but it still responds out of the WAN interface. As best as I can tell, it responds out of the WAN interface because the source address that is provided is a public internet address therefore going out of the WAN default gateway. (mind you, I could be totally misinterpreting this.)

What I want to happen is that the port forward request goes back out to LAN interface to the pFsense guest. I can totally get this to work by disabling the WAN interface but that is not the desired setup.

Can anyone provide some advice?
 
Old 02-16-2016, 06:38 AM   #2
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 355

Rep: Reputation: 60
you say the only service available on the ubuntu VM is the ssh service right ?
Which Interface have you binded your ssh service to , on the ubuntu VM ? (since there are 2 interfaces)

Also , are you using bridged networking for the VM's to communicate with each other ? If not please specify which mode you are using.

If you have setup your ssh service (ubuntu host) to listen only on its WAN IP/Interface, try adding another interface/IP (its local IP) with the following and give it a try :

ListenAddress <WAN IP of ubuntu VM>
ListenAddress <LAN/local IP of ubuntu VM>

or you could try setting the line to "ListenAddress 0.0.0.0" in /etc/sshd_config file.

Hope this helps.
 
Old 02-16-2016, 06:41 AM   #3
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 355

Rep: Reputation: 60
sorry for the typo. I meant /etc/ssh/sshd_config
 
Old 02-16-2016, 07:29 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
The double WAN is killing you neutron, just as you guessed. You might want to use a masquerade rule on the pfSense box. How did you actually do the portforwarding? Or maybe just ssh into the pfSense then into the buntu machine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IP Routing Issue melo15 Linux - Newbie 3 07-14-2010 03:06 AM
Routing issue guanyu Linux - Networking 1 09-10-2006 06:55 AM
routing issue.. inode100 Linux - Networking 12 02-25-2004 03:52 PM
routing issue RyPingu Linux - Networking 1 08-15-2003 01:39 PM
routing issue tanmaya Linux - Networking 1 10-13-2002 10:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration