From: Arthur Kerpician <arthur@bluechip.ro>
To: netfilter@lists.netfilter.org
Subject: VPN Masq
Date: Fri, 18 Feb 2005 17:13:22 +0200 [thread overview]
Message-ID: <42160612.806@bluechip.ro> (raw)
Hi all,
Please consider the following config:
VPN CLIENT
----------------------
External IP: 123.123.123.123
Internal VPN IP: 10.0.0.2
Default gw: 10.0.0.1
VPN SERVER
-----------------------
External IP: 231.231.231.231
Internal VPN IP: 10.0.0.1
All traffic on the VPN client is routed through the VPN server using:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
ipatbles -A FORWARD -s 10.0.0.0/24 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -j REJECT //block the rest
eth0: external NIC on the server
Ok, the gw works on the client so I have internet connection on it. The
problem occurs when an external host tries to access for example the
http server on the client (http://123.123.123.123) or pinging the
client. Since the default gw on the client is the vpn server, I did a
tcpdump -i tap0 (vpn interface) on the server to display some echo
replies on the pings. And I received (on tap0 interface) these echo
replies which weren't routed back to the pinging host. The output was:
21:11:14.983343 123.123.123.123 > 111.111.111.111: icmp: echo reply (DF)
where 111.111.111.111 is the host from where I started to ping.
Somewere on the vpn server the packets are filtered and not sent to the
pinging host. Same for all the connections which have as destination
client's external IP. How can I use client's services for external
hosts? Some tweaks on client's routing table or the server's packet
mangling is faulty?
Thanks,
Arthur
reply other threads:[~2005-02-18 15:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42160612.806@bluechip.ro \
--to=arthur@bluechip.ro \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.