Hi,
I am working on configuring NAT environment with FreeBSD which is a guest on KVM.
Here is my network configuration:
I have a FreeBSD with two virtual interfaces:
- 192.168.0.17/24 - external network on interface called vtnet1
- 100.100.100.17/24 - entry point to internal network 100.100.100.0/24; interface called vtnet0
I have tried following settings:
1. rc.conf:
2. pf.conf:
3. sysctl.conf:
With such a configuration from a host in the internal network 100.100.100.0/24
ping 8.8.8.8 - works ok
ping 192.168.0.17 works ok
telnet 192.168.0.17 22 - connection refused
(all connection tcp, udp) not working..
Do you have any idea what is missing/incorrect in aforementioned settings? What should I do to have connections established correctly?
Thank you for your support!
Rafal
I am working on configuring NAT environment with FreeBSD which is a guest on KVM.
Here is my network configuration:
I have a FreeBSD with two virtual interfaces:
- 192.168.0.17/24 - external network on interface called vtnet1
- 100.100.100.17/24 - entry point to internal network 100.100.100.0/24; interface called vtnet0
I have tried following settings:
1. rc.conf:
Code:
gateway_enable="yes"
pf_enable="yes"
pf_rules="/etc/pf.conf"
2. pf.conf:
Code:
ext_if="vtnet1"
int_if="vtnet0"
internal_net="100.100.100.0/24"
nat on $ext_if from $internal_net to any -> ($ext_if)
pass in quick on lo0 all
pass out quick on lo0 all
pass in quick on vtnet1 all
pass out quick on vtnet1 all
pass in quick on vtnet0 all
pass out quick on vtnet0 all
3. sysctl.conf:
Code:
net.inet.ip.forwarding=1
With such a configuration from a host in the internal network 100.100.100.0/24
ping 8.8.8.8 - works ok
ping 192.168.0.17 works ok
telnet 192.168.0.17 22 - connection refused
(all connection tcp, udp) not working..
Do you have any idea what is missing/incorrect in aforementioned settings? What should I do to have connections established correctly?
Thank you for your support!
Rafal