Home » General » Support » *SOLVED* OpenVPN in VPS : Masquerade
*SOLVED* OpenVPN in VPS : Masquerade [message #8117] |
Wed, 08 November 2006 07:03 |
laurent
Messages: 18 Registered: April 2006
|
Junior Member |
|
|
Hi
I installed an OpenVPN server in a VPS, it work well.
i can, from an Openvpn client , access to the VPS trought a VPN connection.
an ifconfig in the VPS :
tun0 Lien encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet adr:10.34.34.1 P-t-P:10.34.34.2 Masque:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:10
RX bytes:600 (600.0 b) TX bytes:0 (0.0 b)
venet0 Lien encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet adr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Masque:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:3105 errors:0 dropped:0 overruns:0 frame:0
TX packets:3029 errors:0 dropped:10 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:482798 (471.4 KiB) TX bytes:294943 (288.0 KiB)
venet0:0 Lien encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet adr:192.168.7.145 P-t-P:192.168.7.145 Bcast:192.168.7.145 Masque:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
I m trying to connect from the openvpn client to the venet0 network 192.168.7.0/24 (of the VPS)
and it doesn't work. i supposed that i have to masquerade traffic inside the VPS, but ...
i trying to use ine the VPS
# iptables -t nat -A POSTROUTING -s 10.34.34.0/24 -j MASQUERADE
and i have :
iptables: No chain/target/match by that name
I read a lot of messages in the openvz forum , but there is no solution detailed!
some other information :
in the Host
lsmod | grep iptable
iptable_mangle 4544 8
iptable_nat 27540 10 ipt_SAME,ipt_REDIRECT,ipt_NETMAP,ipt_MASQUERADE,ip_nat_irc,i p_nat_tftp,ip_nat_ftp
ip_conntrack 37420 15 ipt_SAME,ipt_REDIRECT,ipt_NETMAP,ipt_MASQUERADE,ipt_helper,i pt_conntrack,ip_nat_irc,ip_nat_tftp,ip_nat_ftp,ip_conntrack_ irc,ip_conntrack_tftp,ip_conntrack_ftp,iptable_nat,ipt_state
iptable_filter 4384 8
ip_tables 22064 26 iptable_mangle,ipt_ttl,ipt_TOS,ipt_tos,ipt_TCPMSS,ipt_tcpmss ,ipt_SAME,ipt_REDIRECT,ipt_recent,ipt_NETMAP,ipt_multiport,i pt_MASQUERADE,ipt_MARK,ipt_mark,ipt_mac,ipt_LOG,ipt_limit,ip t_length,ipt_iprange,ipt_helper,ipt_conntrack,ipt_CLASSIFY,i ptable_nat,ipt_REJECT,ipt_state,iptable_filter
cat /etc/sysconfig/vz | grep iptab
IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length iptable_nat ipt_REDIRECT ipt_conntrack ip_conntrack"
uname -r
2.6.8-022stab077.1-smp
in the VPS:
iptables -t nat -nL
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
thanks in advance for any solution
[Updated on: Thu, 14 June 2007 09:41] by Moderator Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Nov 19 03:31:42 GMT 2024
Total time taken to generate the page: 0.02889 seconds
|