On 2011-12-28, Vahis <wax...@gmail.com.invalid> wrote:
> On 2011-12-28, marrgol <
marsp...@gspammail.com> wrote:
>> On 2011-12-28 18:36, Vahis wrote:
>>>>>I've been looking for a way for a seemingly simple task:
>>>>>
http://www.faqs.org/docs/iptables/iptables-save.html
>>>>>
>>>>>That is I'm trying to save my firewall rules to a backup file.
>>> I tried $ iptables-save> myrules
>>> (I thought that should have been the way)
>>>
>>> Then
>>> $ cat myrules
>>> iptables-save: command not found
>>
>> You need to be root tu run iptables-save successfully and have
>> /usr/sbin in the path.
>
OK. I saved the rules first from a good machine
#ip6tables-save > /etc/goodrules
First I was after this rule:
Chain input_ext (3 references)
-A input_ext -p tcp -m tcp --dport 22 -j ACCEPT
I couldn't figure out the command syntax to put it there
so I copied it from the goodrules file to the bad machine's badrules.
Using vim, go figure.
Then I restored the edited badrules onto the bad machine. Bingo!
#ip6tables-restore < /pathto/badrules
#ip6tables save
I also made another line there, with the same rediculous way:
-A input_ext -p tcp -m tcp --dport 80 -j ACCEPT
Now ssh -6 works fine.
Also http works with ipv6 address, I don't have an ipv6 name resolution for it
yet. So http there is just a proof of concept.
I still wasn't able to make traceroute -6 work from the bad machine,
So I copied the whole goodrules set to the bad machine and it started
working.
The next thing to do is to find the rule(s) which do that.
But that's when I got some more time.
I also need to learn to add remove and replace rules in
iptables/ip6tables :)
I guess I also need to file a bug against YaST not being able to
manage ip6tables?
Thanks.