How to Access Korean-Only Websites from Overseas Using AWS EC2 (Seoul Region VPN)
Some Korean websites (government, financial, public institutions) block access from foreign IP addresses. This guide shows you how to create a quick VPN tunnel through AWS EC2 in Seoul to get a Korean IP address.
What you need: AWS account, AWS CLI installed, Terminal (macOS/Linux)
Step 1: Verify AWS CLI
Make sure AWS CLI is installed and configured:
aws --version
aws sts get-caller-identity --region ap-northeast-2
If you see your Account ID, you're good to go.
Step 2: Create a Key Pair
aws ec2 create-key-pair \
--key-name kr-proxy-key \
--region ap-northeast-2 \
--query 'KeyMaterial' \
--output text > ~/Desktop/kr-proxy-key.pem
chmod 400 ~/Desktop/kr-proxy-key.pem
Step 3: Create a Security Group
# Create security group
aws ec2 create-security-group \
--group-name kr-proxy-sg \
--description "SSH proxy for Korean IP access" \
--region ap-northeast-2
# Allow SSH inbound (replace sg-xxxxx with your Group ID from above)
aws ec2 authorize-security-group-ingress \
--group-id sg-xxxxx \
--protocol tcp \
--port 22 \
--cidr 0.0.0.0/0 \
--region ap-northeast-2
Step 4: Find the Latest AMI
aws ec2 describe-images \
--owners amazon \
--filters "Name=name,Values=al2023-ami-2023*-x86_64" "Name=state,Values=available" \
--query 'Images | sort_by(@, &CreationDate) | [-1].ImageId' \
--output text \
--region ap-northeast-2
Note the AMI ID (e.g. ami-09a64de684ce1ac0e).
Step 5: Launch EC2 Instance
aws ec2 run-instances \
--image-id ami-09a64de684ce1ac0e \
--instance-type t2.micro \
--key-name kr-proxy-key \
--security-group-ids sg-xxxxx \
--associate-public-ip-address \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=kr-proxy}]' \
--region ap-northeast-2 \
--query 'Instances[0].InstanceId' \
--output text
Note the Instance ID (e.g. i-0df42e446381ecc9a).
t2.micro is free-tier eligible (750 hours/month for 12 months).
Step 6: Get Public IP
Wait about 30 seconds, then:
aws ec2 describe-instances \
--instance-ids i-xxxxx \
--region ap-northeast-2 \
--query 'Reservations[0].Instances[0].[State.Name, PublicIpAddress]' \
--output text
You should see something like: running 13.125.x.x
Step 7: Open SSH SOCKS5 Tunnel
ssh -D 1080 -N -f \
-o StrictHostKeyChecking=no \
-i ~/Desktop/kr-proxy-key.pem \
ec2-user@13.125.x.x
-D 1080— Creates a SOCKS5 proxy on local port 1080-N— No remote command (tunnel only)-f— Run in background
Step 8: Verify Korean IP
curl --socks5-hostname localhost:1080 https://ifconfig.me
If it returns your EC2's Korean IP (e.g. 13.125.x.x), it's working!
Step 9: Configure Browser Proxy
Option A: macOS System Settings
- Open System Settings → Network → Wi-Fi
- Click Details... → Proxies
- Enable SOCKS Proxy
- Server:
localhost/ Port:1080 - Click OK
Option B: Terminal (macOS)
sudo networksetup -setsocksfirewallproxy "Wi-Fi" localhost 1080
sudo networksetup -setsocksfirewallproxystate "Wi-Fi" on
Option C: curl only
curl --socks5-hostname localhost:1080 https://www.target-website.kr
Now open your browser and access the Korean website!
Clean Up (Important!)
When you're done, clean up everything to avoid charges:
1. Close the SSH Tunnel
pkill -f "ssh -D 1080"
2. Turn Off Browser Proxy
macOS GUI: System Settings → Network → Wi-Fi → Details → Proxies → SOCKS Proxy OFF
Terminal:
sudo networksetup -setsocksfirewallproxystate "Wi-Fi" off
# Verify
networksetup -getsocksfirewallproxy "Wi-Fi"
# Should show: Enabled: No
3. Terminate EC2 Instance
aws ec2 terminate-instances \
--instance-ids i-xxxxx \
--region ap-northeast-2
4. Delete Security Group
Wait about 30 seconds after termination, then:
aws ec2 delete-security-group \
--group-id sg-xxxxx \
--region ap-northeast-2
5. Delete Key Pair
aws ec2 delete-key-pair \
--key-name kr-proxy-key \
--region ap-northeast-2
rm ~/Desktop/kr-proxy-key.pem
Cost Summary
| Item | Cost |
|---|---|
| t2.micro (free tier) | Free (750 hrs/month, 12 months) |
| t2.micro (after free tier) | ~$0.0116/hr (~$8.5/month) |
| Data transfer | Free up to 100GB/month |
Tip: If you want to keep the instance for later, Stop it instead of terminating. You only pay for EBS storage (~$0.10/GB/month) while stopped.
Quick Reference: Reconnect Later
If you stopped (not terminated) the instance:
# Start the instance
aws ec2 start-instances --instance-ids i-xxxxx --region ap-northeast-2
# Wait ~30 seconds, get new public IP
aws ec2 describe-instances \
--instance-ids i-xxxxx \
--region ap-northeast-2 \
--query 'Reservations[0].Instances[0].PublicIpAddress' \
--output text
# Open tunnel
ssh -D 1080 -N -f -i ~/Desktop/kr-proxy-key.pem ec2-user@NEW-IP
# Set proxy
sudo networksetup -setsocksfirewallproxy "Wi-Fi" localhost 1080
sudo networksetup -setsocksfirewallproxystate "Wi-Fi" on
No comments:
Post a Comment