Hi,
First I want to thank every people that will take the time to answer my very stupid questions. To be honest I think my problems are more due to a lack of knowledge than anything else. However, here is my situation:
I built a low power gateway in order to get that setup:
Internet ----- FreeBSD ----- HomeLAN
My goal is to reach HomeLAN from outside (remote desktop on a few computers) and to provide internet access for both surfing and games. I first attempted to do this with IPTABLES, but I really gave up due to the syntax. After that I read about PF and decided to try with it.
We are now a few months later and I have a running NAT on thatfreebsd FreeBSD gateway that can provide internet to the whole HomeLAN. However, I never managed to get a decent port forwarding. And I'm still stuck out of my network when I try to connect with, for example TightVNC.
Could anyone please tell me what am I doing wrong down there? Here is my basic pf.conf file:
Here is my rc.conf file:
I really hate asking for help that way but I really don't understand at all what's happening nor what to do. Oh, and please forgive my bad English, I'm a French native and it have been years since I last practiced English seriously.
First I want to thank every people that will take the time to answer my very stupid questions. To be honest I think my problems are more due to a lack of knowledge than anything else. However, here is my situation:
I built a low power gateway in order to get that setup:
Internet ----- FreeBSD ----- HomeLAN
My goal is to reach HomeLAN from outside (remote desktop on a few computers) and to provide internet access for both surfing and games. I first attempted to do this with IPTABLES, but I really gave up due to the syntax. After that I read about PF and decided to try with it.
We are now a few months later and I have a running NAT on that
Could anyone please tell me what am I doing wrong down there? Here is my basic pf.conf file:
Code:
internal = "em0"
external = "re0"
antares = "192.168.212.2"
scrub in all
nat on $external from 192.168.212.2 to any -> ($external) static-port
rdr on $external proto tcp from any to $external port 5900 -> $antares port 5900
rdr on $external proto tcp from any to $external port 5800 -> $antares port 5800
pass in quick on $external proto { tcp, udp } from any to $antares port 5900 keep state
pass in quick on $external proto { tcp, udp } from any to $antares port 5800 keep state
pass out quick on $external from any to any
Here is my rc.conf file:
Code:
hostname="Overmind"
ifconfig_re0="DHCP"
ifconfig_em0="inet 192.168.212.1 netmask 255.255.255.0"
#NAT and Packet Forwarding configuration.
gateway_enable="YES"
# NAT rooting with with PF - No port forwarding yet...
pf_enable="YES"
pf_rules="/etc/pf.conf.v2"
pf_flags="" #flags !
pflog_enable="YES"
pflog_profile="/data/var/log/pflog"
pflog_flags=""
I really hate asking for help that way but I really don't understand at all what's happening nor what to do. Oh, and please forgive my bad English, I'm a French native and it have been years since I last practiced English seriously.