Score:0

tun0 doesn't forwards network

br flag

(wlan0 -> tun0) Ubuntu desktop "A" (eth0) -> (eth0) other Ubuntu desktop "B"

I have an OpenVPN connection on "A". OpenVPN server is from a Mikrotik RouterBoard.

I need to forward the OpenVPNs network to "B". So that "B" would get an IP from the OpenVPN server via DHCP.

"A" originally got the internet connection from wlan0. The OpenVPN goes through wlan0 to get to the OpenVPN server.

I am physically connecting the two ethX'es. I bring up IP on both ethX in the same subnet.

So on "A" I am doing:

pkill nm-applet
service iptables stop
iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE
echo '1' > /proc/sys/net/ipv4/ip_forward

But even from tcpdump I cannot see any traffic from "B" to "A" even if I do pings. Why?

us flag
`MASQUERADE` rule only does address translation when B already has an IP address. B does not get an IP address an IP address from OpenVPN server. That would require layer 2 bridging, so that DHCP packets could reach OpenVPN server. Or you could set up a DHCP relay on A to get IP address from the OpenVPN server.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.