Jump to content

I need make a subdomain redirect with iptables


Guest gpaz
 Share

Recommended Posts

Guest gpaz

I need redirect a subdomain of "mydomain.com" to a machine inside my local network. I'm using iptables to make it.

 

The rule is this:

iptables -t nat -A PREROUTING -p tcp -d subdomain.mydomain.com --dport 80 -j DNAT --to-destination 192.168.0.2:80

 

is correct? It don't works.

Samebody can helpme?

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...