• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: iptables  (Read 1156 times)
Pandemonium
Newbie
*

Karma: 0
Posts: 37


View Profile
« on: June 25, 2009, 05:45:14 PM »

I've never done anything manually with iptables before, but I need my sheevaplug to nat traffic for vpn clients connected to it.

I'm running cbxbiker's 2.6.30 kernel on ubuntu, and installed openvpn (rc11) and iptables (1.4.1.1) with apt-get.  The openvpn documentation says to issue the following command:
Code:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

However, when I connect a client after issuing that command and restarting openvpn, all the client can do is ping the server, but cannot see the public internet.  I'm kinda new at this, but it looks like that chain isn't sticking:
Code:
root@vpnplug1:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   

Any idears?
Logged

Pandemonium
Newbie
*

Karma: 0
Posts: 37


View Profile
« Reply #1 on: June 25, 2009, 07:39:23 PM »

Sorry for the noobery.  I figured it out.  I knew I was keeping this Linux Server Hacks book handy, even though it's overdue at the library.  After hours of googling and reading man pages, that's where I found the answer.

I needed to preface my iptables command with the following:
Code:
echo "1" /prov/sys/net/ipv4/ip_forward
Logged

Pages: [1]
Print
Jump to: