Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Oct 26, 2008 11:50 am 
Offline
Junior Member

Joined: Tue Jan 01, 2008 11:31 am
Posts: 38
hy! i set up my openvpn to route traffic to my linode and in iptables i put a postrouting masquerade rule so traffic from the vpn-client is snat-ed to eth0. this works fine. here is the postrouting rule
-A POSTROUTING -o eth0 -j MASQUERADE
(see http://openvpn.net/howto.html#redirect)

ok, i thought it would be a good idea to ad -s <vpn subnet> to the postrouting command so not everybody can nat through my linode. but then nat stops to work. so i thought maybe i put a rule in *filter forward instead, which is set to drop as default:
-A FORWARD ! -i eth0 -j ACCEPT
but then nat stops to work too...

so no matter what i tried (add subnet, ip´s to the postrouting or ip´s, subnet, interface tun0, lo to forward) everytime i limit nat it stops to work. the only working config would be to set forwarding to accept as default and to use the postrouting without limitation.


does anyone have an advice for me? thx!


Top
   
 Post subject:
PostPosted: Thu Oct 30, 2008 6:26 am 
Offline
Newbie
User avatar

Joined: Thu Oct 30, 2008 6:18 am
Posts: 2
Website: http://www.sysack.org
have u tried this?

Code:
iptables -P FORWARD DROP
iptables -A FORWARD -i VPN_INTERFACE -s VPN_NETWORK -j ACCEPT
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group