Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
IP Tables
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
signature16
Tux's lil' helper
Tux's lil' helper


Joined: 31 Aug 2005
Posts: 79

PostPosted: Thu Nov 10, 2005 3:04 am    Post subject: IP Tables Reply with quote

when i try to add a rule to iptables it gives me an error.


Code:
pacificxlinux ~ # iptables -t nat -A PREROUTING -p tcp --dport 80 -i ${WAN} -j DNAT --to 192.168.1.1
Warning: wierd character in interface `-j' (No aliases, :, ! or *).
Bad argument `DNAT'
Try `iptables -h' or 'iptables --help' for more information.



I dont understand why that doesnt work. I copied it out of http://www.gentoo.org/doc/en/home-router-howto.xml


help appreciated :)
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20588

PostPosted: Thu Nov 10, 2005 5:05 am    Post subject: Reply with quote

Did you copy everything from that example? ${WAN} won't translate properly if you didn't do "export WAN=eth1" from the shell. What does echo $WAN output?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum