You are not logged in.

#1 2015-10-09 22:31:56

g0r0
Banned
Registered: 2015-10-05
Posts: 34

OpenVPN in virtualbox as arch as guest

okay im running arch in virtualbox as guest and i wanted to tunnel all my traffic from host to guest VPN server
i followed : https://wiki.archlinux.org/index.php/OpenVPN
until section 8 except that i didnt edit /etc/conf.d/iptables cause i got no conf.d
i want to mention that server and client are connectable to each other but after i connect with the client to the server i got no
internet connection except pinging each other (server and client) in the vpn environment. i did a few changes in ufw and iptables

/etc/default/ufw

T (Network Address Translation) table rules
*nat
:POSTROUTING ACCEPT [0:0]

# Allow traffic from clients to enp1s0
-A POSTROUTING -s 10.0.8.6 -o enp0s3 -j MASQUERADE

# do not delete the "COMMIT" line or the NAT table rules above will not be proce
ssed
COMMIT
as i changed the ip to the client ip and enp1s0 to enp0s3 because thats my NAT interface acording to  " ls /sys/class/net" command

in the iptables thats what i did
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o enp0s3 -j MASQUERADE

another change i made is in the DNS at the server.conf file

push "redirect-gateway def1"
push "dhcp-option DNS 8.8.4.4"

now everything is default beside that e.g server ip 10.8.0.1 and client 10.8.0.6 .. except that im running in virtualbox
so the interface is enp0s3 in the guest

Last edited by g0r0 (2015-10-09 23:36:46)

Offline

Board footer

Powered by FluxBB