Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17793

1)static port address translation 2)bash scripts

$
0
0

1) Cisco router using ios 15.5. I am trying to setup static port address translation so anywhere in the internet can ssh into my pub ip address and it will go into a linux box in my network. The guides online is really straight forward, asking me to do the following ip nat inside source static tcp <private_ip> 22 <public_ip> <$any port>, but it didn't work I got a connection time out. I have a very minimal configuration too, nothing complicated. Iptables in the box is flushed. The windows box that's hosting the vm also have firewall disabled.

 interface GigabitEthernet0/0/0 description public facing internet port no ip dhcp client request dns-nameserver ip address dhcp ip nat outside negotiation auto ! interface GigabitEthernet0/1/0 description the box hosted a vm with ip address 192.168.38.225 switchport access vlan 200 ! interface Vlan200 ip address 192.168.38.1 255.255.255.0 ip nat inside ! ip nat inside source list PRIVATE interface GigabitEthernet0/0/0 overload interface GigabitEthernet0/0/0 description public facing internet port no ip dhcp client request dns-nameserver ip address dhcp ip nat outside negotiation auto ! interface GigabitEthernet0/1/0 description the box I want ssh to with ip .225 switchport access vlan 200 ! interface Vlan200 ip address 192.168.38.1 255.255.255.0 ip nat inside ! p nat inside source static tcp 192.168.38.225 22 14.7.122.744 13822 extendable ip nat inside source list PRIVATE interface GigabitEthernet0/0/0 overload ip access-list extended PRIVATE permit ip 192.168.38.0 0.0.0.255 any permit ip 192.168.0.0 0.0.0.255 any ! 

2) I'm reading a bash script but I am confused with the following for loop. for D_SET in $*, it looks like a basic for loop reading each element in an array, but what is $*? it's not defined anywhere in the script. Resolved: it seems it's parsing what's in the command line =P.

submitted by /u/juniorsysadmin1
[link] [comments]

Viewing all articles
Browse latest Browse all 17793

Trending Articles