I have this: IPSec (IPSec-tools) with xcerts auth on FreeBSD 9-Stable. Ipfw with kernel nat.
I can't find ipfw rules for such problem: I need limit connection for specific port (service that listen on it) for connection going only via VPN.
In this kind of VPN no gre virtual interface created.
VPN connections seen on this port as original IP on clients side.
For example: Client from 1.2.3.4 connect to my server 11.22.33.44 via IPSec take VPN IP 10.0.0.1 but connection on needed port seen as connection from 1.2.3.4 but not from 10.0.0.1 or from 11.22.33.44 (exit from NAT).
don't work
Can anyone point me to right way on this problem?
I can't find ipfw rules for such problem: I need limit connection for specific port (service that listen on it) for connection going only via VPN.
In this kind of VPN no gre virtual interface created.
VPN connections seen on this port as original IP on clients side.
For example: Client from 1.2.3.4 connect to my server 11.22.33.44 via IPSec take VPN IP 10.0.0.1 but connection on needed port seen as connection from 1.2.3.4 but not from 10.0.0.1 or from 11.22.33.44 (exit from NAT).
Code:
ipfw add 100 allow all from any to me 1234 ipsec
ipfw add 100 deny all from any to me 1234
Can anyone point me to right way on this problem?