0

This is my first time EVER posting to these forums. Most of the time when I have an issue I can usually solve them by searching forums/Google. But this one issue has me stumped! My company just deployed a VMware ESXI server that has a VM of pfsense which is setup for routing all LAN and WAN traffic for the most part all except my web server that has its own WAN IP. Our ISP is Comcast. Everything is working flawlessly except this one issue. I installed OpenVPN server onto my pfsense VM and is configured correctly and everything is working great!

My only problem is when i'm connected to OpenVPN I cannot connect to ONE of the CentOS 7 boxes which happens to be our web development server in which we send out development links to clients regularly. I try to connect to the CentOS 7 box via ssh on the local network or any other service and I can not access the machine. I can't even ping the machine. If I am at the office and connect to the local network I have no trouble connecting to any services on that box via the LAN. If I disable the WAN (ifcfg-ens192) everything works fine with OpenVPN but of course now the server can not be accessed from the outside, which kind of makes the development server pointless! >:[ if i set the default gateway using the following command:

[code]route add default gw 10.1.1.1 dev ens160[/code] Everything works fine, but again the outside world will not be able to access the development server. I have tried adding a route-ens160 to help with the routing but to be exactly honest I don't quite understand whats going on! Below are my network configuration files and setup. I have changed some of the WAN IP info a little due to obvious security issues.

This is the ONLY box that is giving me this issue, so I believe everything on ESXI and pfsense is configured properly.We currently have three other VMs on the ESXI server. I can connect to every other VM including the ESXI server itself (vSphere).

Can any of you give me a hand or guide me in the right direction?

Thanks in advance, any help would be greatly appreciated!

-Bryan

Gateway (esxi/pfsense):

Gateway/IP: 10.1.1.1
Subnet: 255.255.255.0
WAN: 74.64.100.122

Comcast IP Block:

IP(s): 74.64.100.121 - 125
Subnet: 255.255.255.248
Gateway: 74.64.100.126

ifcfg-ens160 (LAN):

DEVICE="ens160"
BOOTPROTO="static"
HWADDR="00:0C:49:A9:D1:EB"
IPADDR="10.1.1.13"
NETMASK="255.255.255.0"
#GATEWAY="10.1.1.1"
DEFROUTE="no"
DNS1="75.75.75.75"
DNS2="75.76.76.76"
ONBOOT="yes"
NM_CONTROLLED="no"
ZONE="work"

ifcfg-ens192 (WAN):

DEVICE="ens192"
BOOTPROTO="static"
HWADDR="00:0C:59:A9:D3:F5"
IPADDR="74.64.100.125"
NETMASK="255.255.255.248"
DEFROUTE="yes"
GATEWAY="74.64.100.126"
DNS1="75.75.75.75"
DNS2="75.76.76.76"
ONBOOT="yes"
NM_CONTROLLED="no"
ZONE="public"

route-ens160 (route):

ADDRESS0="10.1.1.0"
NETMASK0="255.255.255.0"
GATEWAY0="74.64.100.126"
ADDRESS1="74.64.100.0"
NETMASK1="255.255.255.248"
GATEWAY1="74.64.100.126"

/etc/sysconfig/network:

NETWORKING="yes"
HOSTNAME="web"

route -n:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         74.64.100.126   0.0.0.0         UG    0      0        0 ens192
10.1.1.0        0.0.0.0         255.255.255.0   U     0      0        0 ens160
74.64.100.120   0.0.0.0         255.255.255.248 U     0      0        0 ens192
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 ens160
169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 ens192

1 Answer 1

0

I solved it my self, I had to create a new routing table. Here is what I did:

Added new routing table to /etc/iproute2/rt_tables

#echo "1 rt2" >> /etc/iproute2/rt_tables

Added routes to LAN config /etc/sysconfig/network-scripts/route-ens160:

#echo "10.1.1.0/24 dev ens160 src 10.1.1.13 table rt2" >> /etc/sysconfig/network-scripts/route-ens160
#echo "default via 10.1.1.1 dev ens160 table rt2" >> /etc/sysconfig/network-scripts/route-ens160

Added rules to LAN config /etc/sysconfig/network-scripts/rule-ens160:

#echo "from 10.1.1.8/29 table rt2" >> /etc/sysconfig/network-scripts/rule-ens160
#echo "to 10.1.1.8/29 table rt2" >> /etc/sysconfig/network-scripts/rule-ens160

Restart network:

#systemctl restart network

Verify new routes and rules:

#ip route list table rt2
-----------
default via 10.1.1.1 dev ens160
10.1.1.0/24 dev ens160  scope link  src 10.1.1.13

#ip rule show
-----------
0:      from all lookup local
32764:  from all to 10.1.1.8/29 lookup rt2
32765:  from 10.1.1.8/29 lookup rt2
32766:  from all lookup main
32767:  from all lookup default

That is it! I will leave my configuration files below as well:

rt_table (/etc/iproute2/rt_tables):

# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
1 rt2

ifcfg-ens160 (/etc/sysconfg/network-scripts/ifcg-ens160):

# LAN CONFIGURATION
# -----------------
DEVICE="ens160"
BOOTPROTO="static"
HWADDR="00:0C:49:A9:D1:EB"
IPADDR="10.1.1.13"
NETMASK="255.255.255.0"
#GATEWAY="10.1.1.1"
DEFROUTE="no"
DNS1="75.75.75.75"
DNS2="75.76.76.76"
ONBOOT="yes"
NM_CONTROLLED="no"
ZONE="work"

route-ens160 (/etc/sysconfg/network-scripts/route-ens160):

# LAN ROUTE CONFIGURATION
# -----------------------
10.1.1.0/24 dev ens160 src 10.1.1.13 table rt2
default via 10.1.1.1 dev ens160 table rt2

rule-ens160 (/etc/sysconfg/network-scripts/rule-ens160):

# LAN RULE CONFIGURATION
# ----------------------
from 10.1.1.8/29 table rt2
to 10.1.1.8/29 table rt2

ifcfg-ens192 (/etc/sysconfig/network-scripts/ifcfg-ens192):

# WAN CONFIGURATION
# -----------------
DEVICE="ens192"
BOOTPROTO="static"
HWADDR="00:0C:59:A9:D3:F5"
IPADDR="74.64.100.125"
NETMASK="255.255.255.248"
DEFROUTE="yes"
GATEWAY="74.64.100.126"
DNS1="75.75.75.75"
DNS2="75.76.76.76"
ONBOOT="yes"
NM_CONTROLLED="no"
ZONE="public"

network (/etc/sysconfig/network)

# NETWORK CONFIGURATION
# ---------------------
NETWORKING="yes"
HOSTNAME="web"

Hope this will one day help someone!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .