View Single Post
Old 09-03-2012, 03:07 PM   #72
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
[root@kindle root]# find / -name iptables
/usr/lib/iptables
/usr/sbin/iptables
/etc/sysconfig/iptables

[root@kindle root]# iptables -L
Quote:
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:40317
ACCEPT tcp -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT udp -- anywhere anywhere state ESTABLISHED
ACCEPT udp -- anywhere anywhere state ESTABLISHED
ACCEPT all -- localhost.localdomain anywhere
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere localhost.localdomain

OPTIONAL TO MAKE IT PERMANENT
Spoiler:

mntroot rw

[root@kindle root]# nano /etc/sysconfig/iptables

(don't mess this up!!!)

add a line

-A INPUT -i wlan0 -p tcp --dport 23 -j ACCEPT

save it

mntroot ro

[root@kindle root]# iptables -A INPUT -i wlan0 -p tcp --dport 23 -j ACCEPT
(just until we reboot, to finish our testing without rebooting...)

now on our main machine:

me@dev ~ $ telnet k
Quote:
Trying 192.168.1.999...
Connected to k.
Escape character is '^]'.

Welcome to Kindle!

#################################################
# N O T I C E * N O T I C E * N O T I C E #
#################################################
Rootfs is mounted read-only. Invoke mntroot rw to
switch back to a writable rootfs.
#################################################
[root@kindle root]#
Heh... sweet.

[root@kindle root]# grep -v
Quote:
BusyBox v1.20.2 (2012-09-03 02:06:04 BST) multi-call binary.
Excellent

Last edited by twobob; 09-03-2012 at 03:21 PM. Reason: finished test.
twobob is offline   Reply With Quote