0

I saw a iptable command like this:

iptables -t nat -A xx -p tcp -m tcp --dport 80 -j DNAT --to %myweb%:80

what's "%" there for? Thanks. Where I can get a manual to tell me what kind of symbols I can use?

1 Answer 1

1

Well, the iptables command there sets up a port forward on TCP from external port 80 to internal port 80 forwarded to whatever IP address or domain is represented by %myweb%. %myweb% seems to be in the same format that Windows uses for its environment variables (on *nix system it would be $MYWEB).

Where did you get this iptables command from? It could just be that the command is an example, and they mean you to manually reply %myweb% with the IP address of your internal web server. Alternately, if it's part of an iptables script, then %myweb% could be getting replaced with the contents of a variable. It's hard to say for sure without knowing its source.

2
  • Thanks. The info is very enough for me. I'm going to check the script if there. :)
    – Yang
    Aug 16, 2012 at 23:13
  • 1
    Its most likely that the %myweb% is just there as a placeholder to indicate to the user that they need to change this value. Sep 9, 2012 at 3:10

You must log in to answer this question.