[lxc-users] Raw socket works not right in lxc

Bostjan Skufca bostjan at a2o.si
Mon Oct 19 07:57:09 UTC 2015


This seems like NAT issue on the host. Did you do "iptables -t nat -I -o
lxcbrX -o phyY -j MASQUERADE"?

b.


On 14 October 2015 at 11:25, <sanyechong12 at live.com> wrote:

> I use raw socket to send an ip packet and fill the source ip 5.5.5.5. I
> use tcpdump to capture it:
>
> * 15:01:29.385061 IP 5.5.5.5 > 224.0.0.18 <http://224.0.0.18>: VRRPv4,
> unknown type (9)*
>
> It works well.
>
>
> But when I setns to a lxc and also send the packet:
>
> *15:03:41.724126 IP 10.28.50.198 > 224.0.0.18 <http://224.0.0.18>: VRRPv4,
> unknown type (9)*
>
> The source ip of the packet changed to "10.28.50.198" which is the ip of
> the interface. Seems like the IP_HDRINCL option not working, but the
> protocol is working.
>
>
> Is there any method to make the source ip right?
>
>
> Forgive my bad english.
>
> Best
> wishes
> Shuai
> sanyechong12 at live.com
>
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151019/dcc2e570/attachment.html>


More information about the lxc-users mailing list