Problem with routing
I'm trying to set up routing on debian. I compiled kernel 2.4.19 with all necessary modules (iptables, maquarade...), but every boot I get an error: "MASQUERADE - command not found". I'm using the following script for routing (it's not mine, i got it):
Code:
#!/bin/sh |
OK, I see your problem. Several of the lines in the file were carried over to the next. It's easy to see which ones because at the end of the line before them is a "\", just backspace all wrapped-over lines to make the file correct. The problem was "MASQUERADE" was seen as a command because it was on a line by itself.
--tarballedtux |
Thanks for help - i fixed the script and now it compiles without errors. But it doesn't work - i'm using Windows XP and i set gateway to 192.168.0.1 (IP of the router), but nothing - i always get error. What can I do?
Here's script: Code:
#!/bin/sh |
For some reason, you threw out the line containing MASQUERADE.
What you should have done is look at the original file to see what the line should be. The first attempt already contained only half of the line. There should be something before "$INTMASK -j MASQUERADE". |
Okey, now i just left everything as it was - i fixed line breaks only...
Code:
#!/bin/sh |
Add these lines...
$IPTABLES -I FORWARD 3 -i $EXTIF -o $INTIF -j LOG --log-prefix "FORWARD_no_state " --log-level 6 $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j LOG --log-prefix "FORWARD_dropped " --log-level 6 and look for packets that are being dropped with "tail -f /var/log/messages" There may be udp dns packets (port 53) etc being dropped unecessarily. If they are, make a rule to ACCEPT them. A quick check can be to change the FORWARD POLICY to ACCEPT. Regards, Peter |
All times are GMT -5. The time now is 03:20 AM. |