Hello,
I've recently set up an OpenVPN tunnel and would like to route the entire traffic of a client (Windows) through a server (FreeBSD). My goal is that all internet applications on the client (e.g. browser, chat, games) connect to the internet using the IP address of the server rather than the client's IP.
The static OpenVPN tunnel I've configured seems to work nicely, the server side uses "ifconfig 10.0.8.1 10.0.8.2" and the client side "ifconfig 10.0.8.2 10.0.8.1". On the server, a "ping 10.0.8.2" reaches the client (and a "ping 10.0.8.1" works fine on the client). Furthermore, I use "redirect-gateway def1" on the Windows client in order to route all outgoing IP traffic through the VPN (according to "ipconfig", the default gateway is activated successfully on the Windows client).
Because of missing FreeBSD know-how, I was not able to configure the server side so far. There are some forums and wikis which describe the necessary steps on the server side for Linux, but I couldn't find anything for FreeBSD. Under Linux, something like this seems to be sufficient:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o eth0 -s 10.0.8.0/24 -j MASQUERADE
How do I achieve a similar effect under FreeBSD (using ipfw and/or natd)? Any help is appreciated.
Thanks,
TC.
I've recently set up an OpenVPN tunnel and would like to route the entire traffic of a client (Windows) through a server (FreeBSD). My goal is that all internet applications on the client (e.g. browser, chat, games) connect to the internet using the IP address of the server rather than the client's IP.
The static OpenVPN tunnel I've configured seems to work nicely, the server side uses "ifconfig 10.0.8.1 10.0.8.2" and the client side "ifconfig 10.0.8.2 10.0.8.1". On the server, a "ping 10.0.8.2" reaches the client (and a "ping 10.0.8.1" works fine on the client). Furthermore, I use "redirect-gateway def1" on the Windows client in order to route all outgoing IP traffic through the VPN (according to "ipconfig", the default gateway is activated successfully on the Windows client).
Because of missing FreeBSD know-how, I was not able to configure the server side so far. There are some forums and wikis which describe the necessary steps on the server side for Linux, but I couldn't find anything for FreeBSD. Under Linux, something like this seems to be sufficient:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o eth0 -s 10.0.8.0/24 -j MASQUERADE
How do I achieve a similar effect under FreeBSD (using ipfw and/or natd)? Any help is appreciated.
Thanks,
TC.