Hi,
I have a FreeBSD server with VNET jails, connected to another network using IPsec (strongswan is working on this server).
The IPsec connection works fine, my jails can communicate with hosts in another network.
Now I want that my host itself communicates with remote hosts using the same tunnel.
So, I added a second loopback interface lo1 with the IP address from the jails network and added a route to the remote network by this lo1 interface:
Now I can ping remote hosts.
The problem is that I only can ping them, neither TCP nor UDP connections work. For example, if I try to telnet a remote server - I get immediately the error on my side:
Once again, the ping works correctly:
What is the difference in routing of ICMP and TCP/UDP? How can I get this working?
I have a FreeBSD server with VNET jails, connected to another network using IPsec (strongswan is working on this server).
The IPsec connection works fine, my jails can communicate with hosts in another network.
Now I want that my host itself communicates with remote hosts using the same tunnel.
So, I added a second loopback interface lo1 with the IP address from the jails network and added a route to the remote network by this lo1 interface:
# route add 10.192.20.0/24 -iface lo1
Now I can ping remote hosts.
The problem is that I only can ping them, neither TCP nor UDP connections work. For example, if I try to telnet a remote server - I get immediately the error on my side:
Code:
# telnet 10.192.20.16 22
Trying 10.192.20.16...
telnet: connect to address 10.192.20.16: Network is unreachable
telnet: Unable to connect to remote host
Code:
# ping 10.192.20.16
PING 10.192.20.16 (10.192.20.16): 56 data bytes
64 bytes from 10.192.20.16: icmp_seq=0 ttl=63 time=10.061 ms
64 bytes from 10.192.20.16: icmp_seq=1 ttl=63 time=10.118 ms
...