Question

what is matter with the two iptable commands?

  • Posted on February 6, 2015
  • elearnAsked by elearn
 sudo vi /etc/pptpd.conf
    localip vps ip
    remoteip 10.100.0.2-10

root@change:~# sudo iptables -t nat -A POSTROUTING -s 10.100.0.0/24-o eth0 -j MASQUERADE
Bad argument `eth0'
Try `iptables -h' or 'iptables --help' for more information.
root@change:~# sudo iptables -A FORWARD -s 10.100.0.0/24-p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1200
Bad argument `tcp'
Try `iptables -h' or 'iptables --help' for more information.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

it is a problem of missing space. The right command are :

sudo iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE sudo iptables -A FORWARD -s 10.100.0.0/24 -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1200

Well if you read the error and look next to eth0 and tcp you see there is a missing space.

I’m guessing that’s the case with the command you used on your VPS as well, otherwise you should use a site like pastebin.com and show us exactly what command you used.

You’re missing two spaces. Both after the /24.